NameExtensions.NameFor(Of TModel, TProperty) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)))
Gets the full HTML field name for the object that is represented by the expression.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
<ExtensionAttribute> Public Shared Function NameFor(Of TModel, TProperty) ( html As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty)) ) As MvcHtmlString
Parameters
- html
-
Type:
System.Web.Mvc.HtmlHelper(Of TModel)
The HTML helper instance that this method extends.
- expression
-
Type:
System.Linq.Expressions.Expression(Of Func(Of TModel, TProperty))
An expression that identifies the object that contains the name.
Return Value
Type: System.Web.Mvc.MvcHtmlStringThe full HTML field name for the object that is represented by the expression.
Type Parameters
- TModel
The type of the model.
- TProperty
The type of the property.
Show: