Class DisplayNameExtensions
Provides a mechanism to get display names.
public static class DisplayNameExtensions
- Inheritance
-
DisplayNameExtensions
- Inherited Members
Methods
DisplayName(HtmlHelper, string)
Gets the display name.
public static MvcHtmlString DisplayName(this HtmlHelper html, string expression)
Parameters
htmlHtmlHelperThe HTML helper instance that this method extends.
expressionstringAn expression that identifies the object that contains the display name.
Returns
- MvcHtmlString
The display name.
DisplayNameForModel(HtmlHelper)
Gets the display name for the model.
public static MvcHtmlString DisplayNameForModel(this HtmlHelper html)
Parameters
htmlHtmlHelperThe HTML helper instance that this method extends.
Returns
- MvcHtmlString
The display name for the model.
DisplayNameFor<TModel, TValue>(HtmlHelper<IEnumerable<TModel>>, Expression<Func<TModel, TValue>>)
Gets the display name for the model.
public static MvcHtmlString DisplayNameFor<TModel, TValue>(this HtmlHelper<IEnumerable<TModel>> html, Expression<Func<TModel, TValue>> expression)
Parameters
htmlHtmlHelper<IEnumerable<TModel>>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TValue>>An expression that identifies the object that contains the display name.
Returns
- MvcHtmlString
The display name for the model.
Type Parameters
TModelThe type of the model.
TValueThe type of the value.
DisplayNameFor<TModel, TValue>(HtmlHelper<TModel>, Expression<Func<TModel, TValue>>)
Gets the display name for the model.
public static MvcHtmlString DisplayNameFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression)
Parameters
htmlHtmlHelper<TModel>The HTML helper instance that this method extends.
expressionExpression<Func<TModel, TValue>>An expression that identifies the object that contains the display name.
Returns
- MvcHtmlString
The display name for the model.
Type Parameters
TModelThe type of the model.
TValueThe type of the value.