DefaultHtmlGenerator.GenerateHidden 方法

定义

生成 <输入类型=“hidden”> 元素

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateHidden(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::Object ^ value, bool useViewData, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateHidden (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool useViewData, object htmlAttributes);
abstract member GenerateHidden : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * obj * bool * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateHidden : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * obj * bool * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GenerateHidden (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String, value As Object, useViewData As Boolean, htmlAttributes As Object) As TagBuilder

参数

viewContext
ViewContext

ViewContext当前范围的实例。

modelExplorer
ModelExplorer

ModelExplorerexpression

expression
String

表达式名称,相对于当前模型。

value
Object

注入到 元素中的值

useViewData
Boolean

是否使用 ViewData 生成此元素

htmlAttributes
Object

一个 Object 包含路由参数的 。 通过检查 的属性 Object,通过反射检索参数。 这 Object 通常是使用 Object 初始值设定项语法创建的。 或者,一个 IDictionary<TKey,TValue> 包含路由参数的实例。

返回

实现

适用于