DisplayNameExtensions.DisplayNameFor Method

 

DisplayNameExtensions.DisplayNameFor(Of TModel, TValue) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TValue)))

Gets the display name for the model.

<ExtensionAttribute>
Public Shared Function DisplayNameFor(Of TModel, TValue) (
	html As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TValue))
) 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 TModelTValue))

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

Return Value

Type: System.Web.Mvc.MvcHtmlString

The display name for the model.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

Return to top

DisplayNameExtensions.DisplayNameFor(Of TModel, TValue) Method (HtmlHelper(Of IEnumerable(Of TModel)), Expression(Of Func(Of TModel, TValue)))

Gets the display name for the model.

<ExtensionAttribute>
Public Shared Function DisplayNameFor(Of TModel, TValue) (
	html As HtmlHelper(Of IEnumerable(Of TModel)),
	expression As Expression(Of Func(Of TModel, TValue))
) As MvcHtmlString

Parameters

html
Type: System.Web.Mvc.HtmlHelper(Of IEnumerable(Of TModel))

The HTML helper instance that this method extends.

expression
Type: System.Linq.Expressions.Expression(Of Func(Of TModelTValue))

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

Return Value

Type: System.Web.Mvc.MvcHtmlString

The display name for the model.

Type Parameters

TModel

The type of the model.

TValue

The type of the value.

Return to top
Show: