public class FormSurfaceController : Umbraco.Web.Mvc.SurfaceController
{
[System.Web.Mvc.HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Endpoint(FormModel model) {
return CurrentUmbracoPage();
This returns me to the form, but all the data is lost.
Not sure what is wrong I have followed the tutorial and viewed forums and my code looks to be correct.
Loosing modelstate in surface controller
I have a form that submits to a surface controller from a partial.
If I add an error and return CurrentUmbracoPage () I loose all my model state.
View:
@Html.Partial("Forms/FormView", new FormModel())
Partial:
Surface controller:
This returns me to the form, but all the data is lost.
Not sure what is wrong I have followed the tutorial and viewed forums and my code looks to be correct.
Thanks!
is working on a reply...