CSRFHiddenField
Generates a random token and stores it in the session cache to protect against Cross-Site Request Forgery (CSRF) attacks.
However, this method returns a hidden input field named "csrf"
#CSRFHiddenField()#
Method Signature
CSRFHiddenField(key=[string], forceNew=[boolean])
Arguments
Argument
Type
Required
Description
Default
key
string
false
The key to store the token under in the cache. Defaults to "default".
default
forceNew
boolean
false
If true, a new token will be generated and stored in the cache. Defaults to false.
false
Examples
Related
Last updated
Was this helpful?