DefaultHtmlGenerator.GenerateAntiforgery(ViewContext) 方法

定义

生成包含防伪造令牌的 <input type=“hidden”.../> 元素。

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

参数

viewContext
ViewContext

ViewContext当前范围的实例。

返回

IHtmlContent输入类型=“hidden”.../> 元素的<实例。 旨在用于窗体>元素内部<。

实现

适用于