|
HtmlHelperAntiForgeryToken Method
|
Generates a hidden form field (anti-forgery token) that is validated when the form is submitted.
Namespace:
GSF.Web.Model
Assembly:
GSF.Web (in GSF.Web.dll) Version: 2.2.202-beta
Syntax public IEncodedString AntiForgeryToken()
Public Function AntiForgeryToken As IEncodedString
public:
IEncodedString^ AntiForgeryToken()
member AntiForgeryToken : unit -> IEncodedString
function AntiForgeryToken();
Request Example
View SourceReturn Value
Type:
IEncodedStringThe generated form field (anti-forgery token).
Remarks
The anti-forgery token can be used to help protect your application against cross-site request forgery.
To use this feature, call the AntiForgeryToken method from a form and add the
ValidateAntiForgeryTokenAttribute attribute to the action method that you want to protect.
See Also