Share via


IHtmlHelper<TModel>.DisplayTextFor<TResult> Method

Definition

Returns the simple display text for the specified expression.

public:
generic <typename TResult>
 System::String ^ DisplayTextFor(System::Linq::Expressions::Expression<Func<TModel, TResult> ^> ^ expression);
public string DisplayTextFor<TResult> (System.Linq.Expressions.Expression<Func<TModel,TResult>> expression);
abstract member DisplayTextFor : System.Linq.Expressions.Expression<Func<'Model, 'Result>> -> string
Public Function DisplayTextFor(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 simple display text. If the expression result is null, returns NullDisplayText.

Applies to