LabelExtensions Class

Represents support for the HTML label element in an ASP.NET MVC view.

Inheritance Hierarchy

System.Object
  System.Web.Mvc.Html.LabelExtensions

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

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class LabelExtensions
public static class LabelExtensions
[ExtensionAttribute]
public ref class LabelExtensions abstract sealed

The LabelExtensions type exposes the following members.

Methods

  Name Description
Public methodStatic member Label Returns an HTML label element and the property name of the property that is represented by the specified expression.
Public methodStatic member LabelFor<TModel, TValue> Returns an HTML label element and the property name of the property that is represented by the specified expression.
Public methodStatic member LabelForModel Returns an HTML label element and the property name of the property that is represented by the model.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Mvc.Html Namespace

Other Resources

Walkthrough: Using Templated Helpers to Display Data in ASP.NET MVC