Delen via


DisplayNameExtensions.DisplayNameFor Method

Definition

Overloads

DisplayNameFor<TModel,TValue>(HtmlHelper<IEnumerable<TModel>>, Expression<Func<TModel,TValue>>)

Gets the display name for the model.

DisplayNameFor<TModel,TValue>(HtmlHelper<TModel>, Expression<Func<TModel,TValue>>)

Gets the display name for the model.

DisplayNameFor<TModel,TValue>(HtmlHelper<IEnumerable<TModel>>, Expression<Func<TModel,TValue>>)

Gets the display name for the model.

public static System.Web.Mvc.MvcHtmlString DisplayNameFor<TModel,TValue> (this System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<TModel>> html, System.Linq.Expressions.Expression<Func<TModel,TValue>> expression);
static member DisplayNameFor : System.Web.Mvc.HtmlHelper<seq<'Model>> * System.Linq.Expressions.Expression<Func<'Model, 'Value>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayNameFor(Of TModel, TValue) (html As HtmlHelper(Of IEnumerable(Of TModel)), expression As Expression(Of Func(Of TModel, TValue))) As MvcHtmlString

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

Parameters

html
HtmlHelper<IEnumerable<TModel>>

The HTML helper instance that this method extends.

expression
Expression<Func<TModel,TValue>>

An expression that identifies the object that contains the display name.

Returns

The display name for the model.

Applies to

DisplayNameFor<TModel,TValue>(HtmlHelper<TModel>, Expression<Func<TModel,TValue>>)

Gets the display name for the model.

public static System.Web.Mvc.MvcHtmlString DisplayNameFor<TModel,TValue> (this System.Web.Mvc.HtmlHelper<TModel> html, System.Linq.Expressions.Expression<Func<TModel,TValue>> expression);
static member DisplayNameFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Value>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function DisplayNameFor(Of TModel, TValue) (html As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TValue))) As MvcHtmlString

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

Parameters

html
HtmlHelper<TModel>

The HTML helper instance that this method extends.

expression
Expression<Func<TModel,TValue>>

An expression that identifies the object that contains the display name.

Returns

The display name for the model.

Applies to