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();
        }
Ejemplo n.º 2
0
        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());
        }