HtmlHelperInputExtensions Class

Definition

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

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

Methods

CheckBox(IHtmlHelper, String)

Returns an <input> element of type "checkbox" with value "true" and an <input> element of type "hidden" with value "false" for the specified expression. Adds a "checked" attribute to the "checkbox" element based on 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".

CheckBox(IHtmlHelper, String, Boolean)

Returns an <input> element of type "checkbox" with value "true" and an <input> element of type "hidden" with value "false" for the specified expression. Adds a "checked" attribute to the "checkbox" element based on the first non-null value found in: the ModelState entry with full name, the isChecked parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

CheckBox(IHtmlHelper, String, Object)

Returns an <input> element of type "checkbox" with value "true" and an <input> element of type "hidden" with value "false" for the specified expression. Adds a "checked" attribute to the "checkbox" element based on the first non-null value found in: the htmlAttributes dictionary entry with key "checked", 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".

CheckBoxFor<TModel>(IHtmlHelper<TModel>, Expression<Func<TModel,Boolean>>)

Returns an <input> element of type "checkbox" with value "true" and an <input> element of type "hidden" with value "false" for the specified expression. Adds a "checked" attribute to the "checkbox" element based on 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".

Hidden(IHtmlHelper, String)

Returns an <input> element of type "hidden" for the specified expression. Adds a "value" attribute to the element containing 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".

Hidden(IHtmlHelper, String, Object)

Returns an <input> element of type "hidden" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

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

Returns an <input> element of type "hidden" for the specified expression. Adds a "value" attribute to the element containing 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".

Password(IHtmlHelper, String)

Returns an <input> element of type "password" for the specified expression. Does not add a "value" attribute.

Password(IHtmlHelper, String, Object)

Returns an <input> element of type "password" for the specified expression. Adds a "value" attribute containing the value parameter if that is non-null.

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

Returns an <input> element of type "password" for the specified expression. Does not add a "value" attribute.

RadioButton(IHtmlHelper, String, Object)

Returns an <input> element of type "radio" for the specified expression. Adds a "value" attribute to the element containing the value parameter if that is non-null. Adds a "checked" attribute to the element if value matches 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".

RadioButton(IHtmlHelper, String, Object, Boolean)

Returns an <input> element of type "radio" for the specified expression. Adds a "value" attribute to the element containing the value parameter if that is non-null. Adds a "checked" attribute to the element if value matches the first non-null value found in: the ModelState entry with full name, the isChecked parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

RadioButton(IHtmlHelper, String, Object, Object)

Returns an <input> element of type "radio" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the value parameter, or the htmlAttributes dictionary entry with key "value". Adds a "checked" attribute to the element if value matches the first non-null value found in: the htmlAttributes dictionary entry with key "checked", 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".

RadioButtonFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, Object)

Returns an <input> element of type "radio" for the specified expression. Adds a "value" attribute to the element containing the value parameter. Adds a "checked" attribute to the element if value matches 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".

TextArea(IHtmlHelper, String)

Returns a <textarea> element for the specified expression. Adds content to the element body based on 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".

TextArea(IHtmlHelper, String, Object)

Returns a <textarea> element for the specified expression. Adds content to the element body based on 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".

TextArea(IHtmlHelper, String, String)

Returns a <textarea> element for the specified expression. Adds content to the element body based on the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

TextArea(IHtmlHelper, String, String, Object)

Returns a <textarea> element for the specified expression. Adds content to the element body based on the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

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

Returns a <textarea> element for the specified expression. Adds content to the element body based on 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".

TextAreaFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, Object)

Returns a <textarea> element for the specified expression. Adds content to the element body based on 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".

TextBox(IHtmlHelper, String)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing 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".

TextBox(IHtmlHelper, String, Object)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

TextBox(IHtmlHelper, String, Object, Object)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, the expression evaluated against Model, or the htmlAttributes dictionary entry with key "value". See Name(String) for more information about a "full name".

TextBox(IHtmlHelper, String, Object, String)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the ModelState entry with full name, the value parameter, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

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

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing 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".

TextBoxFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, Object)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing the first non-null value found in: the ModelState entry with full name, the expression evaluated against Model, or the htmlAttributes dictionary entry with key "value". See NameFor<TResult>(Expression<Func<TModel,TResult>>) for more information about a "full name".

TextBoxFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, String)

Returns an <input> element of type "text" for the specified expression. Adds a "value" attribute to the element containing 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".

Applies to