summaryM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})

Namespace: DotNetNuke.Web.Mvc.Helpers
Assembly: DotNetNuke.Web.Mvc (in DotNetNuke.Web.Mvc.dll)

Syntax

C#
public static MvcHtmlString DisplayNameFor<TModel, TValue>(
	this DnnHtmlHelper<IEnumerable<TModel>> html,
	Expression<Func<TModel, TValue>> expression
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function DisplayNameFor(Of TModel, TValue) ( 
	html As DnnHtmlHelper(Of IEnumerable(Of TModel)),
	expression As Expression(Of Func(Of TModel, TValue))
) As MvcHtmlString

Parameters

html
Type: DotNetNuke.Web.Mvc.Helpers..::..DnnHtmlHelper<(Of <(<'IEnumerable<(Of <(<'TModel>)>)>>)>)>
paramhtmlM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})
expression
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TModel, TValue>)>)>>)>)>
paramexpressionM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})

Type Parameters

TModel
typeparamTModelM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})
TValue
typeparamTValueM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})

Return Value

returnsM:DotNetNuke.Web.Mvc.Helpers.HtmlDisplayNameExtensions.DisplayNameFor``2(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper{System.Collections.Generic.IEnumerable{``0}},System.Linq.Expressions.Expression{System.Func{``0,``1}})

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DnnHtmlHelper<(Of <(<'IEnumerable<(Of <(<'TModel>)>)>>)>)>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also