namespace oek2.Models.MemberProfile
{
public class MemberProfileViewModel
{
public string Room { get; set; }
}
}
SurfaceController:
using System.Web.Mvc;
using oek2.Models.MemberProfile;
namespace oek2.Controllers.MemberProfile
{
public class MemberProfileSurfaceController : Umbraco.Web.Mvc.SurfaceController
{
[HttpPost]
public ActionResult UpdateProfile(MemberProfileViewModel profile)
{
//model not valid, do not save, but return current umbraco page
if (!ModelState.IsValid)
{
return CurrentUmbracoPage();
}
return RedirectToCurrentUmbracoPage();
}
}
}
MVC form post in U6
I am trying to create a simple MVC form in Umbraco 6 using this tutorial: http://our.umbraco.org/documentation/Reference/Mvc/forms/turorial-partial-views
My result is simply an error message: "Error loading Partial View script (file: ~/Views/MacroPartials/MemberProfile.cshtml)"
I have followed the tutorial pretty tight.
PartialView:
ViewModel:
SurfaceController:
Can someone point me in the right direction?
I don't think you need a partial view macro. Just a normal partial view.
That got me on the right track, thanks
is working on a reply...