mvc html.label,LabelExtensions.Label Method (System.Web.Mvc.Html) | Microsoft Docs

LabelExtensions.Label Method

Definition

Assembly:System.Web.Mvc.dll

Package:Microsoft.AspNet.Mvc v5.2.6

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

In this article

Overloads

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

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

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

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

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

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

Label(HtmlHelper, String)

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 Label (this System.Web.Mvc.HtmlHelper html, string expression);

static member Label : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

Returns

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

Applies to

Label(HtmlHelper, String, IDictionary)

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 Label (this System.Web.Mvc.HtmlHelper html, string expression, System.Collections.Generic.IDictionary htmlAttributes);

static member Label : System.Web.Mvc.HtmlHelper * string * System.Collections.Generic.IDictionary -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

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

Label(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 Label (this System.Web.Mvc.HtmlHelper html, string expression, object htmlAttributes);

static member Label : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String, htmlAttributes As Object) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

htmlAttributes

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

Label(HtmlHelper, String, 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 Label (this System.Web.Mvc.HtmlHelper html, string expression, string labelText);

static member Label : System.Web.Mvc.HtmlHelper * string * string -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String, labelText As String) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

labelText

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

Label(HtmlHelper, String, String, IDictionary)

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 Label (this System.Web.Mvc.HtmlHelper html, string expression, string labelText, System.Collections.Generic.IDictionary htmlAttributes);

static member Label : System.Web.Mvc.HtmlHelper * string * string * System.Collections.Generic.IDictionary -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String, labelText As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

labelText

The label text.

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

Label(HtmlHelper, String, 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 Label (this System.Web.Mvc.HtmlHelper html, string expression, string labelText, object htmlAttributes);

static member Label : System.Web.Mvc.HtmlHelper * string * string * obj -> System.Web.Mvc.MvcHtmlString

Public Function Label (html As HtmlHelper, expression As String, labelText As String, htmlAttributes As Object) As MvcHtmlString

Parameters

The HTML helper instance that this method extends.

expression

An expression that identifies the property to display.

labelText

The label text.

htmlAttributes

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值