HtmlHelperLabelExtensions.LabelForModel Method

Definition

Overloads

LabelForModel(IHtmlHelper)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper, Object)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper, String)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper, String, Object)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper)

Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs

Returns a <label> element for the current model.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ LabelForModel(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper);
public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper);
static member LabelForModel : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function LabelForModel (htmlHelper As IHtmlHelper) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

Returns

A new IHtmlContent containing the <label> element.

Applies to

LabelForModel(IHtmlHelper, Object)

Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs

Returns a <label> element for the current model.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ LabelForModel(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::Object ^ htmlAttributes);
public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object htmlAttributes);
static member LabelForModel : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function LabelForModel (htmlHelper As IHtmlHelper, htmlAttributes As Object) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

htmlAttributes
Object

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

Returns

A new IHtmlContent containing the <label> element.

Applies to

LabelForModel(IHtmlHelper, String)

Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs

Returns a <label> element for the current model.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ LabelForModel(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ labelText);
public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string labelText);
static member LabelForModel : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function LabelForModel (htmlHelper As IHtmlHelper, labelText As String) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

labelText
String

The inner text of the element.

Returns

A new IHtmlContent containing the <label> element.

Applies to

LabelForModel(IHtmlHelper, String, Object)

Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs
Source:
HtmlHelperLabelExtensions.cs

Returns a <label> element for the current model.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ LabelForModel(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ labelText, System::Object ^ htmlAttributes);
public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string labelText, object htmlAttributes);
static member LabelForModel : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function LabelForModel (htmlHelper As IHtmlHelper, labelText As String, htmlAttributes As Object) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

labelText
String

The inner text of the element.

htmlAttributes
Object

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

Returns

A new IHtmlContent containing the <label> element.

Applies to