FormTagHelper.Antiforgery Property

Definition

Whether the antiforgery token should be generated.

public:
 property Nullable<bool> Antiforgery { Nullable<bool> get(); void set(Nullable<bool> value); };
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeName("asp-antiforgery")]
public bool? Antiforgery { get; set; }
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeName("asp-antiforgery")>]
member this.Antiforgery : Nullable<bool> with get, set
Public Property Antiforgery As Nullable(Of Boolean)

Property Value

Defaults to false if user provides an action attribute or if the method is Get; true otherwise.

Attributes

Applies to