Created
October 23, 2011 20:34
-
-
Save motowilliams/1307859 to your computer and use it in GitHub Desktop.
Getting-started-with-MVCContrib-Filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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