how to return model back to page after post submit using surfacecontroller v13
hi all,
I have surface controller, partial view form return some values on submit and the controller has some work to do and return model back to page so we can load next stage of the form .
I'm struggling here to send the model back to page bcos return RedirectToCurrentUmbracoPage(); and return CurrentUmbracoPage(); seems to be losing the data . when page reload.
I have assigned model to TempData["CheckerResult"] in controller but struggling to read from View again .
I have tried to convert TempData back to object model it throwing an error.
how to return model back to page after post submit using surfacecontroller v13
hi all, I have surface controller, partial view form return some values on submit and the controller has some work to do and return model back to page so we can load next stage of the form .
I'm struggling here to send the model back to page bcos return RedirectToCurrentUmbracoPage(); and return CurrentUmbracoPage(); seems to be losing the data . when page reload.
I have assigned model to TempData["CheckerResult"] in controller but struggling to read from View again . I have tried to convert TempData back to object model it throwing an error.
anyone know how to pass complex models back to view and reload form page?
HI Pathini,
Could you try using
if that doesn't work for you, try using
Cookies, Local Storage or Session State
I'm using surface controller and render partial view using a macro inside richtext editor.
when call submit, post action in controller load more details to model return to current page , I have access TempData from view but seems to be empty
is working on a reply...