IHtmlHelper.Label(String, String, Object) IHtmlHelper.Label(String, String, Object) IHtmlHelper.Label(String, String, Object) Method

Definition

Returns a <label> element for the specified expression.

public Microsoft.AspNetCore.Html.IHtmlContent Label (string expression, string labelText, object htmlAttributes);
abstract member Label : string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function Label (expression As String, labelText As String, htmlAttributes As Object) As IHtmlContent

Parameters

expression
String String String

Expression name, relative to the current model.

labelText
String String String

The inner text of the element.

htmlAttributes
Object Object 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