Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save motowilliams/1307859 to your computer and use it in GitHub Desktop.
Save motowilliams/1307859 to your computer and use it in GitHub Desktop.
Getting-started-with-MVCContrib-Filters
[HttpPost]
[ModelStateToTempData]
public ActionResult CreateCustomer(CustomerEditModel customerEditModel)
{
if (ModelState.IsValid)
{
//Do Something Worthy of your NEW Customer
return RedirectToAction("Success");
}
return RedirectToAction("FixErrors");
}
[HttpGet]
[ModelStateToTempData]
public ActionResult FixErrors()
{
return View("Index");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment