Error message from Umbraco Field in SurfaceController
I have a field in Umbraco, where the user can input a error text - How do i use that in a controller? Look at the line: ModelState.AddModelError("", "I WANT THE MESSAGE FROM UMBRACO FIELD HERE");
if (!ModelState.IsValid)
{
return CurrentUmbracoPage();
}
if (Membership.ValidateUser(model.Username, model.Password))
{
FormsAuthentication.SetAuthCookie(model.Username, false);
return Redirect("/logged-in-page/");
}
else
{
//Write an error
ModelState.AddModelError("", "I WANT THE MESSAGE FROM UMBRACO FIELD HERE");
return CurrentUmbracoPage();
}
Error message from Umbraco Field in SurfaceController
I have a field in Umbraco, where the user can input a error text - How do i use that in a controller?
Look at the line: ModelState.AddModelError("", "I WANT THE MESSAGE FROM UMBRACO FIELD HERE");
Hi Nicky,
Is the field on the same node as the CurrentUmbracoPage or some other node?
Jeavon
The field is on the same node
Ok then:
is working on a reply...