public ActionResult HandleContactForm(ContactFormModel model) { if (!ModelState.IsValid) { //Not valid - so lets return the user back to the view with the data they entered still prepopulated return CurrentUmbracoPage(); } //send email TempData["IsSuccessful"] = true; //All done - lets redirect to the current page & show our thanks/success message return RedirectToCurrentUmbracoPage(); }
public ActionResult HandleContactForm(ContactFormModel model) { if (!ModelState.IsValid) { //Not valid - so lets return the user back to the view with the data they entered still prepopulated return(CurrentUmbracoPage()); } //send email TempData["IsSuccessful"] = true; //All done - lets redirect to the current page & show our thanks/success message return(RedirectToCurrentUmbracoPage()); }