Created
October 23, 2011 20:35
-
-
Save motowilliams/1307864 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] | |
[PassParametersDuringRedirect] | |
public ActionResult CreateCustomer(CustomerEditModel customerEditModel) | |
{ | |
if (ModelState.IsValid) | |
{ | |
//Do Something Worthy of your NEW Customer | |
return this.RedirectToAction(x => x.Success(customerEditModel)); | |
} | |
return RedirectToAction("FixErrors"); | |
} | |
[HttpGet] | |
[PassParametersDuringRedirect] | |
public ActionResult Success(CustomerEditModel customerEditModel) | |
{ | |
return View(customerEditModel); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment