Compartir a través de


IHtmlGenerator.GenerateAntiforgery(ViewContext) Método

Definición

Genere un <elemento input type="hidden".../> que contiene un token antiforgery.

public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateAntiforgery(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext);
public Microsoft.AspNetCore.Html.IHtmlContent GenerateAntiforgery (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext);
abstract member GenerateAntiforgery : Microsoft.AspNetCore.Mvc.Rendering.ViewContext -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function GenerateAntiforgery (viewContext As ViewContext) As IHtmlContent

Parámetros

viewContext
ViewContext

Instancia ViewContext del ámbito actual.

Devoluciones

Instancia IHtmlContent del <elemento input type="hidden".../> . Diseñado para usarse dentro de un <elemento de formulario> .

Se aplica a