Dela via


IHtmlHelper<TModel> Interface

Definition

An IHtmlHelper for Linq expressions.

generic <typename TModel>
public interface class IHtmlHelper : Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper
public interface IHtmlHelper<TModel> : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
type IHtmlHelper<'Model> = interface
    interface IHtmlHelper
Public Interface IHtmlHelper(Of TModel)
Implements IHtmlHelper

Type Parameters

TModel

The type of the model.

Derived
Implements

Properties

Html5DateRenderingMode

Set this property to CurrentCulture to have templated helpers such as Editor(String, String, String, Object) and EditorFor<TResult>(Expression<Func<TModel,TResult>>, String, String, Object) render date and time values using the current culture. By default, these helpers render dates and times as RFC 3339 compliant strings.

(Inherited from IHtmlHelper)
IdAttributeDotReplacement

Gets the String that replaces periods in the ID attribute of an element.

(Inherited from IHtmlHelper)
MetadataProvider

Gets the metadata provider. Intended for use in IHtmlHelper extension methods.

(Inherited from IHtmlHelper)
TempData

Gets the current ITempDataDictionary instance.

(Inherited from IHtmlHelper)
UrlEncoder

Gets the UrlEncoder to be used for encoding a URL.

(Inherited from IHtmlHelper)
ViewBag

Gets the view bag.

(Inherited from IHtmlHelper)
ViewContext

Gets the context information about the view.

(Inherited from IHtmlHelper)
ViewData

Gets the current view data.

Methods

ActionLink(String, String, String, String, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

(Inherited from IHtmlHelper)
AntiForgeryToken()

Returns a <hidden> element (antiforgery token) that will be validated when the containing <form> is submitted.

(Inherited from IHtmlHelper)
BeginForm(String, String, Object, FormMethod, Nullable<Boolean>, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

(Inherited from IHtmlHelper)
BeginRouteForm(String, Object, FormMethod, Nullable<Boolean>, Object)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

(Inherited from IHtmlHelper)
CheckBox(String, Nullable<Boolean>, 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. If isChecked is non-null, instead uses the first non-null value found in: the ModelState entry with full name, or the isChecked parameter. See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
CheckBoxFor(Expression<Func<TModel,Boolean>>, 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", or the ModelState entry with full name. If expression evaluates to a non-null value, instead uses 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".

Display(String, String, String, Object)

Returns HTML markup for the expression, using a display template, specified HTML field name, and additional view data. The template is found using the templateName or the expression's ModelMetadata.

(Inherited from IHtmlHelper)
DisplayFor<TResult>(Expression<Func<TModel,TResult>>, String, String, Object)

Returns HTML markup for the expression, using a display template, specified HTML field name, and additional view data. The template name is taken from the templateName or the expression’s TemplateHint. If the template file is not found, a default template will be used.

DisplayName(String)

Returns the display name for the specified expression.

(Inherited from IHtmlHelper)
DisplayNameFor<TResult>(Expression<Func<TModel,TResult>>)

Returns the display name for the specified expression.

DisplayNameForInnerType<TModelItem,TResult>(Expression<Func<TModelItem,TResult>>)

Returns the display name for the specified expression if the current model represents a collection.

DisplayText(String)

Returns the simple display text for the specified expression.

(Inherited from IHtmlHelper)
DisplayTextFor<TResult>(Expression<Func<TModel,TResult>>)

Returns the simple display text for the specified expression.

DropDownList(String, IEnumerable<SelectListItem>, String, Object)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on optionLabel and selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
DropDownListFor<TResult>(Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>, String, Object)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on optionLabel and selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text 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".

Editor(String, String, String, Object)

Returns HTML markup for the expression, using an editor template, specified HTML field name, and additional view data. The template is found using the templateName or the expression's ModelMetadata.

(Inherited from IHtmlHelper)
EditorFor<TResult>(Expression<Func<TModel,TResult>>, String, String, Object)

Returns HTML markup for the expression, using an editor template, specified HTML field name, and additional view data. The template is found using the templateName or the expression's ModelMetadata.

Encode(Object)

Converts the value to an HTML-encoded String.

Encode(String)

Converts the specified String to an HTML-encoded String.

EndForm()

Renders the </form> end tag to the response.

(Inherited from IHtmlHelper)
FormatValue(Object, String)

Formats the value.

(Inherited from IHtmlHelper)
GenerateIdFromName(String)

Returns an HTML element Id for the specified expression fullName.

(Inherited from IHtmlHelper)
GetEnumSelectList(Type)

Returns a select list for the given enumType.

(Inherited from IHtmlHelper)
GetEnumSelectList<TEnum>()

Returns a select list for the given TEnum.

(Inherited from IHtmlHelper)
Hidden(String, Object, 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, the expression evaluated against Model, or the htmlAttributes dictionary entry with key "value". See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
HiddenFor<TResult>(Expression<Func<TModel,TResult>>, 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 or the expression evaluated against Model. See NameFor<TResult>(Expression<Func<TModel,TResult>>) for more information about a "full name".

Id(String)

Returns the HTML element Id for the specified expression.

(Inherited from IHtmlHelper)
IdFor<TResult>(Expression<Func<TModel,TResult>>)

Returns the HTML element Id for the specified expression.

Label(String, String, Object)

Returns a <label> element for the specified expression.

(Inherited from IHtmlHelper)
LabelFor<TResult>(Expression<Func<TModel,TResult>>, String, Object)

Returns a <label> element for the specified expression.

ListBox(String, IEnumerable<SelectListItem>, Object)

Returns a multi-selection <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches an entry in the first non-null collection found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
ListBoxFor<TResult>(Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>, Object)

Returns a multi-selection <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches an entry in the first non-null collection 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".

Name(String)

Returns the full HTML element name for the specified expression. Uses HtmlFieldPrefix (if non-empty) to reflect relationship between current Model and the top-level view's model.

(Inherited from IHtmlHelper)
NameFor<TResult>(Expression<Func<TModel,TResult>>)

Returns the full HTML element name for the specified expression. Uses HtmlFieldPrefix (if non-empty) to reflect relationship between current Model and the top-level view's model.

PartialAsync(String, Object, ViewDataDictionary)

Returns HTML markup for the specified partial view.

(Inherited from IHtmlHelper)
Password(String, Object, Object)

Returns an <input> element of type "password" for the specified expression. Adds a "value" attribute containing the first non-null value in: the value parameter, or the htmlAttributes dictionary entry with key "value".

(Inherited from IHtmlHelper)
PasswordFor<TResult>(Expression<Func<TModel,TResult>>, Object)

Returns an <input> element of type "password" for the specified expression. Adds a "value" attribute containing the htmlAttributes dictionary entry with key "value" (if any).

RadioButton(String, Object, Nullable<Boolean>, 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. If isChecked is non-null, instead uses the first non-null value found in: the ModelState entry with full name, or the isChecked parameter. See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
RadioButtonFor<TResult>(Expression<Func<TModel,TResult>>, 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", or the ModelState entry with full name. If expression evaluates to a non-null value, instead uses 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". Adds a "value" attribute to the element containing the value parameter.

Raw(Object)

Wraps HTML markup from the string representation of an Object in an HtmlString, without HTML-encoding the string representation.

Raw(String)

Wraps HTML markup in an HtmlString, without HTML-encoding the specified value.

RenderPartialAsync(String, Object, ViewDataDictionary)

Renders HTML markup for the specified partial view.

(Inherited from IHtmlHelper)
RouteLink(String, String, String, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified route.

(Inherited from IHtmlHelper)
TextArea(String, String, Int32, Int32, 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".

(Inherited from IHtmlHelper)
TextAreaFor<TResult>(Expression<Func<TModel,TResult>>, Int32, Int32, 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(String, Object, 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, the expression evaluated against Model, or the htmlAttributes dictionary entry with key "value". See Name(String) for more information about a "full name".

(Inherited from IHtmlHelper)
TextBoxFor<TResult>(Expression<Func<TModel,TResult>>, 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 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".

ValidationMessage(String, String, Object, String)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

(Inherited from IHtmlHelper)
ValidationMessageFor<TResult>(Expression<Func<TModel,TResult>>, String, Object, String)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationSummary(Boolean, String, Object, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

(Inherited from IHtmlHelper)
Value(String, 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".

(Inherited from IHtmlHelper)
ValueFor<TResult>(Expression<Func<TModel,TResult>>, String)

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".

Extension Methods

RenderComponentAsync(IHtmlHelper, Type, RenderMode, Object)

Renders the specified componentType.

RenderComponentAsync<TComponent>(IHtmlHelper, RenderMode, Object)

Renders the TComponent.

RenderComponentAsync<TComponent>(IHtmlHelper, RenderMode)

Renders the TComponent.

Display(IHtmlHelper, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the expression's ModelMetadata.

Display(IHtmlHelper, String, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

Display(IHtmlHelper, String, String, String)

Returns HTML markup for the expression, using a display template and specified HTML field name. The template is found using the templateName or the expression'sModelMetadata.

Display(IHtmlHelper, String, String)

Returns HTML markup for the expression, using a display template. The template is found using the templateName or the expression's ModelMetadata.

Display(IHtmlHelper, String)

Returns HTML markup for the expression, using a display template. The template is found using the expression's ModelMetadata.

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

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the expression's ModelMetadata.

DisplayFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, String, Object)

Returns HTML markup for the expression, using a display template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using a display template and specified HTML field name. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using a display template. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using a display template. The template is found using the expression's ModelMetadata.

DisplayForModel(IHtmlHelper, Object)

Returns HTML markup for the current model, using a display template and specified additional view data. The template is found using the model's ModelMetadata.

DisplayForModel(IHtmlHelper, String, Object)

Returns HTML markup for the current model, using a display template and specified additional view data. The template is found using the templateName or the model's ModelMetadata.

DisplayForModel(IHtmlHelper, String, String, Object)

Returns HTML markup for the current model, using a display template, specified HTML field name, and additional view data. The template is found using the templateName or the model's ModelMetadata.

DisplayForModel(IHtmlHelper, String, String)

Returns HTML markup for the current model, using a display template and specified HTML field name. The template is found using the templateName or the model's ModelMetadata.

DisplayForModel(IHtmlHelper, String)

Returns HTML markup for the current model, using a display template. The template is found using the templateName or the model's ModelMetadata.

DisplayForModel(IHtmlHelper)

Returns HTML markup for the current model, using a display template. The template is found using the model's ModelMetadata.

DisplayNameForModel(IHtmlHelper)

Returns the display name for the current model.

Editor(IHtmlHelper, String, Object)

Returns HTML markup for the expression, using an editor template and specified additional view data. The template is found using the expression's ModelMetadata.

Editor(IHtmlHelper, String, String, Object)

Returns HTML markup for the expression, using an editor template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

Editor(IHtmlHelper, String, String, String)

Returns HTML markup for the expression, using an editor template and specified HTML field name. The template is found using the templateName or the expression's ModelMetadata.

Editor(IHtmlHelper, String, String)

Returns HTML markup for the expression, using an editor template. The template is found using the templateName or the expression's ModelMetadata.

Editor(IHtmlHelper, String)

Returns HTML markup for the expression, using an editor template. The template is found using the expression's ModelMetadata.

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

Returns HTML markup for the expression, using an editor template and specified additional view data. The template is found using the expression's ModelMetadata.

EditorFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, String, Object)

Returns HTML markup for the expression, using an editor template and specified additional view data. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using an editor template and specified HTML field name. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using an editor template. The template is found using the templateName or the expression's ModelMetadata.

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

Returns HTML markup for the expression, using an editor template. The template is found using the expression's ModelMetadata.

EditorForModel(IHtmlHelper, Object)

Returns HTML markup for the current model, using an editor template and specified additional view data. The template is found using the model's ModelMetadata.

EditorForModel(IHtmlHelper, String, Object)

Returns HTML markup for the current model, using an editor template and specified additional view data. The template is found using the templateName or the model's ModelMetadata.

EditorForModel(IHtmlHelper, String, String, Object)

Returns HTML markup for the current model, using an editor template, specified HTML field name, and additional view data. The template is found using the templateName or the model's ModelMetadata.

EditorForModel(IHtmlHelper, String, String)

Returns HTML markup for the current model, using an editor template and specified HTML field name. The template is found using the templateName or the model's ModelMetadata.

EditorForModel(IHtmlHelper, String)

Returns HTML markup for the current model, using an editor template. The template is found using the templateName or the model's ModelMetadata.

EditorForModel(IHtmlHelper)

Returns HTML markup for the current model, using an editor template. The template is found using the model's ModelMetadata.

BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, Nullable<Boolean>)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

BeginForm(IHtmlHelper, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, String, String, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String, Object, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

BeginRouteForm(IHtmlHelper, Object, Nullable<Boolean>)

Renders a <form> start tag to the response. The first route that can provide a URL with the specified routeValues generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, Object)

Renders a <form> start tag to the response. The first route that can provide a URL with the specified routeValues generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String, FormMethod, Object)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String, FormMethod)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String, Nullable<Boolean>)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String, Object, FormMethod)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String, Object)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

BeginRouteForm(IHtmlHelper, String)

Renders a <form> start tag to the response. The route with name routeName generates the <form>'s action attribute value.

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".

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".

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, 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".

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".

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, 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.

Password(IHtmlHelper, String)

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

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, 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".

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".

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, 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, 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".

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)

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".

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".

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".

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".

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)

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".

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".

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".

Label(IHtmlHelper, String, String)

Returns a <label> element for the specified expression.

Label(IHtmlHelper, String)

Returns a <label> element for the specified expression.

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

Returns a <label> element for the specified expression.

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

Returns a <label> element for the specified expression.

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

Returns a <label> element for the specified expression.

LabelForModel(IHtmlHelper, Object)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper, String, Object)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper, String)

Returns a <label> element for the current model.

LabelForModel(IHtmlHelper)

Returns a <label> element for the current model.

ActionLink(IHtmlHelper, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String)

Returns an anchor (<a>) element that contains a URL path to the specified action.

RouteLink(IHtmlHelper, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified route.

RouteLink(IHtmlHelper, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified route.

RouteLink(IHtmlHelper, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified route.

RouteLink(IHtmlHelper, String, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified route.

RouteLink(IHtmlHelper, String, String)

Returns an anchor (<a>) element that contains a URL path to the specified route.

IdForModel(IHtmlHelper)

Returns the HTML element Id for the current model.

NameForModel(IHtmlHelper)

Returns the full HTML element name for the current model. Uses HtmlFieldPrefix (if non-empty) to reflect relationship between current Model and the top-level view's model.

Partial(IHtmlHelper, String, ViewDataDictionary)

Returns HTML markup for the specified partial view.

Partial(IHtmlHelper, String, Object, ViewDataDictionary)

Returns HTML markup for the specified partial view.

Partial(IHtmlHelper, String, Object)

Returns HTML markup for the specified partial view.

Partial(IHtmlHelper, String)

Returns HTML markup for the specified partial view.

PartialAsync(IHtmlHelper, String, ViewDataDictionary)

Returns HTML markup for the specified partial view.

PartialAsync(IHtmlHelper, String, Object)

Returns HTML markup for the specified partial view.

PartialAsync(IHtmlHelper, String)

Returns HTML markup for the specified partial view.

RenderPartial(IHtmlHelper, String, ViewDataDictionary)

Renders HTML markup for the specified partial view.

RenderPartial(IHtmlHelper, String, Object, ViewDataDictionary)

Renders HTML markup for the specified partial view.

RenderPartial(IHtmlHelper, String, Object)

Renders HTML markup for the specified partial view.

RenderPartial(IHtmlHelper, String)

Renders HTML markup for the specified partial view.

RenderPartialAsync(IHtmlHelper, String, ViewDataDictionary)

Renders HTML markup for the specified partial view.

RenderPartialAsync(IHtmlHelper, String, Object)

Renders HTML markup for the specified partial view.

RenderPartialAsync(IHtmlHelper, String)

Renders HTML markup for the specified partial view.

DropDownList(IHtmlHelper, String, IEnumerable<SelectListItem>, Object)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

DropDownList(IHtmlHelper, String, IEnumerable<SelectListItem>, String)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on optionLabel and selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

DropDownList(IHtmlHelper, String, IEnumerable<SelectListItem>)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

DropDownList(IHtmlHelper, String, String)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on optionLabel and the ViewData entry with full name. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

DropDownList(IHtmlHelper, String)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on the ViewData entry with full name. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

DropDownListFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>, Object)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text 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".

DropDownListFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>, String)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on optionLabel and selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text 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".

DropDownListFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>)

Returns a single-selection HTML <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text 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".

ListBox(IHtmlHelper, String, IEnumerable<SelectListItem>)

Returns a multi-selection <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name (unless used instead of selectList), or the expression evaluated against Model. See Name(String) for more information about a "full name".

ListBox(IHtmlHelper, String)

Returns a multi-selection <select> element for the expression. Adds <option> elements based on the ViewData entry with full name. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

ListBoxFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, IEnumerable<SelectListItem>)

Returns a multi-selection <select> element for the expression. Adds <option> elements based on selectList. Adds a "selected" attribute to an <option> if its Value (if non-null) or Text matches the first non-null value found in: the ModelState entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

ValidationMessage(IHtmlHelper, String, Object)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationMessage(IHtmlHelper, String, String, Object)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationMessage(IHtmlHelper, String, String, String)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationMessage(IHtmlHelper, String, String)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationMessage(IHtmlHelper, String)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationMessageFor<TModel,TResult>(IHtmlHelper<TModel>, Expression<Func<TModel,TResult>>, String, Object)

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

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

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

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

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

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

Returns the validation message if an error exists in the ModelStateDictionary object for the specified expression.

ValidationSummary(IHtmlHelper, Boolean, String, Object)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean, String, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, Object, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, Object)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

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