Share via


HtmlHelper.GenerateLabel(ModelExplorer, String, String, Object) Method

Definition

Generate a label.

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

Parameters

modelExplorer
ModelExplorer

The ModelExplorer.

expression
String

The expresion.

labelText
String

The label text.

htmlAttributes
Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

The IHtmlContent.

Applies to