共用方式為


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> 路由參數的實例。

傳回

實作

適用於