LabelExtensions::Label Method

 

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

Namespace:   System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticLabel(HtmlHelper^, String^)

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

System_CAPS_pubmethodSystem_CAPS_staticLabel(HtmlHelper^, String^, IDictionary<String^, Object^>^)

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

System_CAPS_pubmethodSystem_CAPS_staticLabel(HtmlHelper^, String^, Object^)

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

System_CAPS_pubmethodSystem_CAPS_staticLabel(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.

System_CAPS_pubmethodSystem_CAPS_staticLabel(HtmlHelper^, String^, String^, IDictionary<String^, Object^>^)

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

System_CAPS_pubmethodSystem_CAPS_staticLabel(HtmlHelper^, String^, String^, Object^)

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

Return to top

LabelExtensions::Label Method (HtmlHelper^, String^)

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

public:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

A property named Weight might render markup such as the following:

<label for="Weight">
    Weight
</label>
Return to top

LabelExtensions::Label Method (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:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression,
	IDictionary<String^, Object^>^ htmlAttributes
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

htmlAttributes
Type: System.Collections.Generic::IDictionary<String^, Object^>^

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

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

Return to top

LabelExtensions::Label Method (HtmlHelper^, String^, Object^)

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

public:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression,
	Object^ htmlAttributes
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

htmlAttributes
Type: System::Object^

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

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

Return to top

LabelExtensions::Label Method (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:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression,
	String^ labelText
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

labelText
Type: System::String^

The label text to display.

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

Return to top

LabelExtensions::Label Method (HtmlHelper^, String^, String^, IDictionary<String^, Object^>^)

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

public:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression,
	String^ labelText,
	IDictionary<String^, Object^>^ htmlAttributes
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

labelText
Type: System::String^

The label text.

htmlAttributes
Type: System.Collections.Generic::IDictionary<String^, Object^>^

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

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

Return to top

LabelExtensions::Label Method (HtmlHelper^, String^, String^, Object^)

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

public:
[ExtensionAttribute]
static MvcHtmlString^ Label(
	HtmlHelper^ html,
	String^ expression,
	String^ labelText,
	Object^ htmlAttributes
)

Parameters

html
Type: System.Web.Mvc::HtmlHelper^

The HTML helper instance that this method extends.

expression
Type: System::String^

An expression that identifies the property to display.

labelText
Type: System::String^

The label text.

htmlAttributes
Type: System::Object^

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

Return Value

Type: System.Web.Mvc::MvcHtmlString^

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

Return to top
Show: