Skip to content

Instantly share code, notes, and snippets.

@johnmmoss
Created May 2, 2015 14:35
Show Gist options
  • Save johnmmoss/be529d25125b4bd32d5c to your computer and use it in GitHub Desktop.
Save johnmmoss/be529d25125b4bd32d5c to your computer and use it in GitHub Desktop.
CSRF Controller Attribute
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Index(FeedbackModel model)
{
// Controller code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment