Share via


DefaultHtmlGenerator.AddPlaceholderAttribute 方法

定義

將預留位置屬性加入至 tagBuilder

protected:
 virtual void AddPlaceholderAttribute(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData, Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ tagBuilder, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression);
protected virtual void AddPlaceholderAttribute (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression);
abstract member AddPlaceholderAttribute : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
override this.AddPlaceholderAttribute : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
Protected Overridable Sub AddPlaceholderAttribute (viewData As ViewDataDictionary, tagBuilder As TagBuilder, modelExplorer As ModelExplorer, expression As String)

參數

viewData
ViewDataDictionary

ViewDataDictionary目前範圍的實例。

tagBuilder
TagBuilder

TagBuilder 執行個體。

modelExplorer
ModelExplorer

ModelExplorerexpression

expression
String

相對於目前模型的運算式名稱。

適用於