DisplayTextExtensions.DisplayTextFor(Of TModel, TResult) Method (HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TResult)))

 

Returns HTML markup for each property in the object that is represented by the specified expression.

Namespace:   System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

<ExtensionAttribute>
Public Shared Function DisplayTextFor(Of TModel, TResult) (
	html As HtmlHelper(Of TModel),
	expression As Expression(Of Func(Of TModel, TResult))
) 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 TModelTResult))

An expression that identifies the object that contains the properties to display.

Return Value

Type: System.Web.Mvc.MvcHtmlString

The HTML markup for each property.

Type Parameters

TModel

The type of the model.

TResult

The type of the result.

Return to top
Show: