Class DisplayTextExtensions
Provides a way to render object values as HTML.
public static class DisplayTextExtensions
- Inheritance
-
DisplayTextExtensions
- Inherited Members
Methods
DisplayText(HtmlHelper, string)
Returns HTML markup for each property in the object that is represented by the specified expression.
public static MvcHtmlString DisplayText(this HtmlHelper html, string name)
Parameters
htmlHtmlHelperThe HTML helper instance that this method extends.
namestringAn expression that identifies the object that contains the properties to display.
Returns
- MvcHtmlString
The HTML markup for each property in the object that is represented by the expression.
DisplayTextFor<TModel, TResult>(HtmlHelper<TModel>, Expression<Func<TModel, TResult>>)
Returns HTML markup for each property in the object that is represented by the specified expression.
public static MvcHtmlString DisplayTextFor<TModel, TResult>(this HtmlHelper<TModel> html, Expression<Func<TModel, TResult>> expression)
Parameters
htmlHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TResult>>An expression that identifies the object that contains the properties to display.
Returns
- MvcHtmlString
The HTML markup for each property.
Type Parameters
TModelThe type of the model.
TResultThe type of the result.