HtmlHelper.AntiForgeryToken Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
AntiForgeryToken() |
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form. |
AntiForgeryToken(String) |
Obsoleti.
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form. Il valore del campo viene generato usando il valore salt specificato. |
AntiForgeryToken(String, String, String) |
Obsoleti.
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form. Il valore del campo viene generato usando il valore salt, il dominio e il percorso specificati. |
AntiForgeryToken()
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form.
public System.Web.Mvc.MvcHtmlString AntiForgeryToken ();
member this.AntiForgeryToken : unit -> System.Web.Mvc.MvcHtmlString
Public Function AntiForgeryToken () As MvcHtmlString
Restituisce
Campo del form generato (token antifalsificazione).
Si applica a
AntiForgeryToken(String)
Attenzione
This method is deprecated. Use the AntiForgeryToken() method instead. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form. Il valore del campo viene generato usando il valore salt specificato.
[System.Obsolete("This method is deprecated. Use the AntiForgeryToken() method instead. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.", true)]
public System.Web.Mvc.MvcHtmlString AntiForgeryToken (string salt);
member this.AntiForgeryToken : string -> System.Web.Mvc.MvcHtmlString
Public Function AntiForgeryToken (salt As String) As MvcHtmlString
Parametri
- salt
- String
Valore salt che può essere una qualsiasi stringa non vuota.
Restituisce
Campo del form generato (token antifalsificazione).
- Attributi
Si applica a
AntiForgeryToken(String, String, String)
Attenzione
This method is deprecated. Use the AntiForgeryToken() method instead. To specify a custom domain for the generated cookie, use the <httpCookies> configuration element. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.
Genera un campo del form nascosto (token antifalsificazione) che viene convalidato all'invio del form. Il valore del campo viene generato usando il valore salt, il dominio e il percorso specificati.
[System.Obsolete("This method is deprecated. Use the AntiForgeryToken() method instead. To specify a custom domain for the generated cookie, use the <httpCookies> configuration element. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.", true)]
public System.Web.Mvc.MvcHtmlString AntiForgeryToken (string salt, string domain, string path);
member this.AntiForgeryToken : string * string * string -> System.Web.Mvc.MvcHtmlString
Public Function AntiForgeryToken (salt As String, domain As String, path As String) As MvcHtmlString
Parametri
- salt
- String
Valore salt che può essere una qualsiasi stringa non vuota.
- domain
- String
Dominio dell'applicazione.
- path
- String
Percorso virtuale.
Restituisce
Campo del form generato (token antifalsificazione).
- Attributi