Created
December 17, 2014 02:37
-
-
Save nozzlegear/e4428241629cde12ad4e to your computer and use it in GitHub Desktop.
Using the ValidateHeaderAntiForgeryToken attribute
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Helpers; | |
| using System.Web.Mvc; | |
| namespace MyNamespace.Controllers{ | |
| public class SomePathController : Controller{ | |
| // POST: /SomePath/DoSomething | |
| [HttpPost, ValidateHeaderAntiForgeryToken] | |
| public ActionResult DoSomething(string FirstName, string LastName){ | |
| // Do something here | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment