Share via


HtmlHelperValueExtensions Class

Definition

Value-related extensions for IHtmlHelper and IHtmlHelper<TModel>.

public ref class HtmlHelperValueExtensions abstract sealed
public static class HtmlHelperValueExtensions
type HtmlHelperValueExtensions = class
Public Module HtmlHelperValueExtensions
Inheritance
HtmlHelperValueExtensions

Methods

Value(IHtmlHelper, String)

Returns the formatted value for the specified expression. Specifically, returns the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

ValueFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>)

Returns the formatted value for the specified expression. Specifically, returns the first non-null value found in: the ModelState entry with full name, or the expression evaluated against Model. See NameFor<TResult>(Expression<Func<TModel,TResult>>) for more information about a "full name".

ValueForModel(IHtmlHelper, String)

Returns the formatted value for the current model. Specifically, returns the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name, or the Model. See Name(String) for more information about a "full name".

ValueForModel(IHtmlHelper)

Returns the formatted value for the current model. Specifically, returns the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name, or the Model. See Name(String) for more information about a "full name".

Applies to