Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
ASP.NET
ASP.NET MVC 1.0
 AntiForgeryToken Method
Collapse All/Expand All Collapse All
Members FilterMembers Filter
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
HtmlHelper<(Of <(TModel>)>)..::.AntiForgeryToken Method

Generates a hidden form field (anti-forgery token) that is validated when the form is submitted.

  NameDescription
Public method AntiForgeryToken()()() Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. (Inherited from HtmlHelper.)
Public method AntiForgeryToken(String) Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value. (Inherited from HtmlHelper.)
Public method AntiForgeryToken(String, String, String) Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value, domain, and path. (Inherited from HtmlHelper.)
Top

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 within your form, and add the ValidateAntiForgeryTokenAttribute to the action method you want to protect.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker