LabelExtensions.Label Method
Definition
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.
Overloads
Label(HtmlHelper, String) |
Returns an HTML label element and the property name of the property that is represented by the specified expression. |
Label(HtmlHelper, String, IDictionary<String,Object>) |
Returns an HTML label element and the property name of the property that is represented by the specified expression. |
Label(HtmlHelper, String, Object) |
Returns an HTML label element and the property name of the property that is represented by the specified expression. |
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. |
Label(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. |
Label(HtmlHelper, String, String, Object) |
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
<Extension()>
Public Function Label (html As HtmlHelper, expression As String) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
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<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, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member Label : System.Web.Mvc.HtmlHelper * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Label (html As HtmlHelper, expression As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
An expression that identifies the property to display.
- 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
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
<Extension()>
Public Function Label (html As HtmlHelper, expression As String, htmlAttributes As Object) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
An expression that identifies the property to display.
- 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
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
<Extension()>
Public Function Label (html As HtmlHelper, expression As String, labelText As String) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
An expression that identifies the property to display.
- 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
Label(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 static System.Web.Mvc.MvcHtmlString Label (this System.Web.Mvc.HtmlHelper html, string expression, string labelText, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member Label : System.Web.Mvc.HtmlHelper * string * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Label (html As HtmlHelper, expression As String, labelText As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
An expression that identifies the property to display.
- 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
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
<Extension()>
Public Function Label (html As HtmlHelper, expression As String, labelText As String, htmlAttributes As Object) As MvcHtmlString
Parameters
- html
- HtmlHelper
The HTML helper instance that this method extends.
- expression
- String
An expression that identifies the property to display.
- 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.