HtmlHelper.GenerateLabel(ModelExplorer, String, String, Object) 方法

定义

生成标签。

protected:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateLabel(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::String ^ labelText, System::Object ^ htmlAttributes);
protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateLabel (Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string labelText, object htmlAttributes);
abstract member GenerateLabel : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.GenerateLabel : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Protected Overridable Function GenerateLabel (modelExplorer As ModelExplorer, expression As String, labelText As String, htmlAttributes As Object) As IHtmlContent

参数

modelExplorer
ModelExplorer

ModelExplorer

expression
String

expresion.

labelText
String

标签文本。

htmlAttributes
Object

一个 Object ,其中包含元素的 HTML 属性。 或者,一个 IDictionary<TKey,TValue> 包含 HTML 属性的 实例。

返回

IHtmlContent

适用于