IHtmlHelper<TModel>.NameFor(Expression<Func<TModel,TResult>>) IHtmlHelper<TModel>.NameFor(Expression<Func<TModel,TResult>>) IHtmlHelper<TModel>.NameFor(Expression<Func<TModel,TResult>>) Method

Definition

Returns the full HTML element name for the specified expression. Uses HtmlFieldPrefix (if non-empty) to reflect relationship between current Model and the top-level view's model.

public string NameFor<TResult> (System.Linq.Expressions.Expression<Func<TModel,TResult>> expression);
abstract member NameFor : System.Linq.Expressions.Expression<Func<'Model, 'Result>> -> string
Public Function NameFor(Of TResult) (expression As Expression(Of Func(Of TModel, TResult))) As String

Type Parameters

TResult

The type of the expression result.

Parameters

expression
Expression<Func<TModel,TResult>>

An expression to be evaluated against the current model.

Returns

A String containing the element name.

Applies to