Share via


LabelExtensions.LabelForModel Method

Definition

Overloads

LabelForModel(HtmlHelper)

Returns an HTML label element and the property name of the property that is represented by the model.

LabelForModel(HtmlHelper, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, String)

Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.

LabelForModel(HtmlHelper, String, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, String, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper)

Returns an HTML label element and the property name of the property that is represented by the model.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html);
static member LabelForModel : System.Web.Mvc.HtmlHelper -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

Returns

An HTML label element and the property name of the property that is represented by the model.

Applies to

LabelForModel(HtmlHelper, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member LabelForModel : System.Web.Mvc.HtmlHelper * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

htmlAttributes
IDictionary<String,Object>

An object that contains the HTML attributes to set for the element.

Returns

An HTML label element and the property name of the property that is represented by the expression.

Applies to

LabelForModel(HtmlHelper, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html, object htmlAttributes);
static member LabelForModel : System.Web.Mvc.HtmlHelper * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper, htmlAttributes As Object) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

htmlAttributes
Object

An object that contains the HTML attributes to set for the element.

Returns

An HTML label element and the property name of the property that is represented by the expression.

Applies to

LabelForModel(HtmlHelper, String)

Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html, string labelText);
static member LabelForModel : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper, labelText As String) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

labelText
String

The label text to display.

Returns

An HTML label element and the property name of the property that is represented by the expression.

Applies to

LabelForModel(HtmlHelper, String, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html, string labelText, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member LabelForModel : System.Web.Mvc.HtmlHelper * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper, labelText As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

labelText
String

The label Text.

htmlAttributes
IDictionary<String,Object>

An object that contains the HTML attributes to set for the element.

Returns

An HTML label element and the property name of the property that is represented by the expression.

Applies to

LabelForModel(HtmlHelper, String, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

public static System.Web.Mvc.MvcHtmlString LabelForModel (this System.Web.Mvc.HtmlHelper html, string labelText, object htmlAttributes);
static member LabelForModel : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function LabelForModel (html As HtmlHelper, labelText As String, htmlAttributes As Object) As MvcHtmlString

Parameters

html
HtmlHelper

The HTML helper instance that this method extends.

labelText
String

The label text.

htmlAttributes
Object

An object that contains the HTML attributes to set for the element.

Returns

An HTML label element and the property name of the property that is represented by the expression.

Applies to