Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi i want to create a Registration form in umbraco 7.5 version. I created Registration Document Type with template and Created RegistrationController and Registration Surface controller. i was able to show the typedview with model inheriting from Rendermodel.
In my registration view i have
and i have archtetype control to render a form.
When i submit the form i want to show message in view that email already exists. how can i pass the same model which i got from submiting the registration page so that it can show the message and same form again.
public ActionResult Register(RegistrationFormModel model)
var memberContext = memberService.GetByEmail(model.Username);
if (memberContext != null)
ModelState.AddModelError("Username", "The username/email is already registered.");
TempData["Error"] = "The entered email address is already registered.";
// else do registration
i was able to get page back but model is new
My registration archetype control has this
@Html.RenderAction("ArchetypeForm/RegistrationCtrlForm", new RegistrationFormModel())
and my Registration Template has this
@using ContentModels = Umbraco.Web.PublishedContentModels;
Layout = "Master.cshtml";
Can Any one have better idea to do or correction.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted