Skip to content

Instantly share code, notes, and snippets.

@kmlprtsng
Created August 14, 2013 08:13
Show Gist options
  • Save kmlprtsng/6228943 to your computer and use it in GitHub Desktop.
Save kmlprtsng/6228943 to your computer and use it in GitHub Desktop.
Adding AntiForgeryToken CSRF
using (Html.BeginForm())
{
@Html.AntiForgeryToken()
}
//In the Controller method add the annotation [validateAntiForgeryToken]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment