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

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

适用于