Created
September 25, 2017 22:28
-
-
Save digitalParkour/687e960cc1286b9bf46162ed336212b3 to your computer and use it in GitHub Desktop.
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
| [HttpGet] | |
| public ActionResult FormA() | |
| { | |
| var model = _example.GetModel(); | |
| return PartialView(model); | |
| } | |
| [HttpPost] | |
| [MultiformPostProtection] /* Verifies form token matches this action, Form A, otherwise returns FormA() */ | |
| [ValidateAntiForgeryToken] | |
| public ActionResult FormA(ExampleModel model) | |
| { | |
| return Content("Form A - Submitted!"); | |
| } | |
| [HttpGet] | |
| public ActionResult FormB() | |
| { | |
| var model = _example.GetModel(); | |
| return PartialView(model); | |
| } | |
| [HttpPost] | |
| [MultiformPostProtection] /* Verifies form token matches this action name, Form B, otherwise returns FormB() */ | |
| [ValidateAntiForgeryToken] | |
| public ActionResult FormB(ExampleModel model) | |
| { | |
| return Content("Form B - Submitted!"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment