Share via


HtmlHelper.AntiForgeryToken Method

Definition

Returns a <hidden> element (antiforgery token) that will be validated when the containing <form> is submitted.

public:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ AntiForgeryToken();
public Microsoft.AspNetCore.Html.IHtmlContent AntiForgeryToken ();
abstract member AntiForgeryToken : unit -> Microsoft.AspNetCore.Html.IHtmlContent
override this.AntiForgeryToken : unit -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function AntiForgeryToken () As IHtmlContent

Returns

IHtmlContent containing the <hidden> element.

Implements

Applies to