HtmlHelperExtensions.LabelFor<TModel, TValue> Method (HtmlHelper<TModel>, Expression<Func<TModel, TValue>>)
Namespace: Microsoft.Web.Mvc.Html
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
public static MvcHtmlString LabelFor<TModel, TValue>(
this HtmlHelper<TModel> htmlHelper,
Expression<Func<TModel, TValue>> expression
)
public:
generic<typename TModel, typename TValue>
[ExtensionAttribute]
static MvcHtmlString^ LabelFor(
HtmlHelper<TModel>^ htmlHelper,
Expression<Func<TModel, TValue>^>^ expression
)
static member LabelFor<'TModel, 'TValue> :
htmlHelper:HtmlHelper<'TModel> *
expression:Expression<Func<'TModel, 'TValue>> -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function LabelFor(Of TModel, TValue) (
htmlHelper As HtmlHelper(Of TModel),
expression As Expression(Of Func(Of TModel, TValue))
) As MvcHtmlString
Parameters
- htmlHelper
Type: System.Web.Mvc.HtmlHelper<TModel>
- expression
Type: System.Linq.Expressions.Expression<Func<TModel, TValue>>
Return Value
Type: System.Web.Mvc.MvcHtmlString
Type Parameters
- TModel
- TValue
See Also
HtmlHelperExtensions Class
Microsoft.Web.Mvc.Html Namespace
Return to top