API
AutoValidateAntiforgeryTokenAttribute
Applies validation to unsafe methods under configured MVC scope.
Formal Syntax & Structure
csharp syntaxcsharp
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());Working Example
Example Snippetcsharp
// Documentary fragment; see linked lesson for context.options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());