Share via


HtmlHelper Class

Definition

Supports the rendering of HTML controls in a view.

public class HtmlHelper
type HtmlHelper = class
Public Class HtmlHelper
Inheritance
HtmlHelper
Derived

Constructors

HtmlHelper(ViewContext, IViewDataContainer, RouteCollection)

Initializes a new instance of the HtmlHelper class by using the specified view context, view data container, and route collection.

HtmlHelper(ViewContext, IViewDataContainer)

Initializes a new instance of the HtmlHelper class by using the specified view context and view data container.

Fields

ValidationInputCssClassName

The name of the CSS class that is used to style an input field when a validation error occurs.

ValidationInputValidCssClassName

The name of the CSS class that is used to style an input field when the input is valid.

ValidationMessageCssClassName

The name of the CSS class that is used to style the error message when a validation error occurs.

ValidationMessageValidCssClassName

The name of the CSS class that is used to style the validation message when the input is valid.

ValidationSummaryCssClassName

The name of the CSS class that is used to style validation summary error messages.

ValidationSummaryValidCssClassName

The name of the CSS class that is used to style the validation summary when the input is valid.

Properties

ClientValidationEnabled

Gets or sets a value that indicates whether client validation is enabled.

Html5DateRenderingMode

Gets or sets the HTML5 date rendering mode.

IdAttributeDotReplacement

Gets or sets the character that replaces periods in the ID attribute of an element.

RouteCollection

Gets or sets the collection of routes for the application.

UnobtrusiveJavaScriptEnabled

Gets or sets a value that indicates whether unobtrusive JavaScript is enabled.

ValidationMessageElement

Element name used to wrap the validation message generated by ValidationMessage(HtmlHelper, String) and other overloads.

ValidationSummaryMessageElement

Element name used to wrap a top-level message in ValidationSummary(HtmlHelper) and other overloads.

ViewBag

Gets the view bag.

ViewContext

Gets or sets the context information about the view.

ViewData

Gets the current view data dictionary.

ViewDataContainer

Gets or sets the view data container.

Methods

AnonymousObjectToHtmlAttributes(Object)

Replaces underscore characters (_) with hyphens (-) in the specified HTML attributes.

AntiForgeryToken()

Generates a hidden form field (anti-forgery token) that is validated when the form is submitted.

AntiForgeryToken(String, String, String)
Obsolete.

Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value, domain, and path.

AntiForgeryToken(String)
Obsolete.

Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value.

AttributeEncode(Object)

Converts the specified attribute value to an HTML-encoded string.

AttributeEncode(String)

Converts the specified attribute value to an HTML-encoded string.

EnableClientValidation()

Enables input validation that is performed by using client script in the browser.

EnableClientValidation(Boolean)

Enables or disables client validation.

EnableUnobtrusiveJavaScript()

Enables or disables unobtrusive JavaScript.

EnableUnobtrusiveJavaScript(Boolean)

Enables or disables unobtrusive JavaScript.

Encode(Object)

Converts the value of the specified object to an HTML-encoded string.

Encode(String)

Converts the specified string to an HTML-encoded string.

FormatValue(Object, String)

Formats the value.

GenerateIdFromName(String, String)

Creates an HTML element ID using the specified element name and a string that replaces dots in the name.

GenerateIdFromName(String)

Creates an HTML element ID using the specified element name.

GenerateLink(RequestContext, RouteCollection, String, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Generates an HTML anchor element (a element) that links to the specified action method.

GenerateLink(RequestContext, RouteCollection, String, String, String, String, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Generates an HTML anchor element (a element) that links to the specified action method, and enables the user to specify the communication protocol, name of the host, and a URL fragment.

GenerateRouteLink(RequestContext, RouteCollection, String, String, RouteValueDictionary, IDictionary<String,Object>)

Generates an HTML anchor element (a element) that links to the specified URL route.

GenerateRouteLink(RequestContext, RouteCollection, String, String, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Generates an HTML anchor element (a element) that links to the specified URL route, and enables the user to specify the communication protocol, name of the host, and a URL fragment.

GetFormMethodString(FormMethod)

Returns the HTTP method that handles form input (GET or POST) as a string.

GetInputTypeString(InputType)

Returns the HTML input control type as a string.

GetUnobtrusiveValidationAttributes(String, ModelMetadata)

Gets the collection of unobtrusive JavaScript validation attributes using the specified HTML name attribute and model metadata.

GetUnobtrusiveValidationAttributes(String)

Gets the collection of unobtrusive JavaScript validation attributes using the specified HTML name attribute.

HttpMethodOverride(HttpVerbs)

Returns a hidden input element that identifies the override method for the specified verb that represents the HTTP data-transfer method used by the client.

HttpMethodOverride(String)

Returns a hidden input element that identifies the override method for the specified HTTP data-transfer method that was used by the client.

ObjectToDictionary(Object)

Creates a dictionary from an object, by adding each public instance property as a key with its associated value to the dictionary. It will expose public properties from derived types as well. This is typically used with objects of an anonymous type.

Raw(Object)

Returns markup that is not HTML encoded.

Raw(String)

Returns markup that is not HTML encoded.

SetValidationMessageElement(String)

Set element name used to wrap the validation message generated by ValidationMessage(HtmlHelper, String) and other overloads.

SetValidationSummaryMessageElement(String)

Set element name used to wrap a top-level message in ValidationSummary(HtmlHelper) and other overloads.

Extension Methods

Action(HtmlHelper, String, Object)

Invokes the specified child action method with the specified parameters and returns the result as an HTML string.

Action(HtmlHelper, String, String, Object)

Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.

Action(HtmlHelper, String, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.

Action(HtmlHelper, String, String)

Invokes the specified child action method using the specified controller name and returns the result as an HTML string.

Action(HtmlHelper, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and returns the result as an HTML string.

Action(HtmlHelper, String)

Invokes the specified child action method and returns the result as an HTML string.

RenderAction(HtmlHelper, String, Object)

Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.

RenderAction(HtmlHelper, String, String, Object)

Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.

RenderAction(HtmlHelper, String, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.

RenderAction(HtmlHelper, String, String)

Invokes the specified child action method using the specified controller name and renders the result inline in the parent view.

RenderAction(HtmlHelper, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.

RenderAction(HtmlHelper, String)

Invokes the specified child action method and renders the result inline in the parent view.

Display(HtmlHelper, String, Object)

Returns HTML markup for each property in the object that is represented by a string expression, using additional view data.

Display(HtmlHelper, String, String, Object)

Returns HTML markup for each property in the object that is represented by the expression, using the specified template and additional view data.

Display(HtmlHelper, String, String, String, Object)

Returns HTML markup for each property in the object that is represented by the expression, using the specified template, HTML field ID, and additional view data.

Display(HtmlHelper, String, String, String)

Returns HTML markup for each property in the object that is represented by the expression, using the specified template and an HTML field ID.

Display(HtmlHelper, String, String)

Returns HTML markup for each property in the object that is represented by the expression, using the specified template.

Display(HtmlHelper, String)

Returns HTML markup for each property in the object that is represented by a string expression.

DisplayForModel(HtmlHelper, Object)

Returns HTML markup for each property in the model, using additional view data.

DisplayForModel(HtmlHelper, String, Object)

Returns HTML markup for each property in the model, using the specified template and additional view data.

DisplayForModel(HtmlHelper, String, String, Object)

Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data.

DisplayForModel(HtmlHelper, String, String)

Returns HTML markup for each property in the model using the specified template and HTML field ID.

DisplayForModel(HtmlHelper, String)

Returns HTML markup for each property in the model using the specified template.

DisplayForModel(HtmlHelper)

Returns HTML markup for each property in the model.

DisplayName(HtmlHelper, String)

Gets the display name.

DisplayNameForModel(HtmlHelper)

Gets the display name for the model.

DisplayText(HtmlHelper, String)

Returns HTML markup for each property in the object that is represented by the specified expression.

Editor(HtmlHelper, String, Object)

Returns an HTML input element for each property in the object that is represented by the expression, using additional view data.

Editor(HtmlHelper, String, String, Object)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data.

Editor(HtmlHelper, String, String, String, Object)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data.

Editor(HtmlHelper, String, String, String)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name.

Editor(HtmlHelper, String, String)

Returns an HTML input element for each property in the object that is represented by the expression, using the specified template.

Editor(HtmlHelper, String)

Returns an HTML input element for each property in the object that is represented by the expression.

EditorForModel(HtmlHelper, Object)

Returns an HTML input element for each property in the model, using additional view data.

EditorForModel(HtmlHelper, String, Object)

Returns an HTML input element for each property in the model, using the specified template and additional view data.

EditorForModel(HtmlHelper, String, String, Object)

Returns an HTML input element for each property in the model, using the template name, HTML field name, and additional view data.

EditorForModel(HtmlHelper, String, String)

Returns an HTML input element for each property in the model, using the specified template name and HTML field name.

EditorForModel(HtmlHelper, String)

Returns an HTML input element for each property in the model, using the specified template.

EditorForModel(HtmlHelper)

Returns an HTML input element for each property in the model.

BeginForm(HtmlHelper, Object)

Writes an opening <form> tag to the response and includes the route values in the action attribute. The form uses the POST method, and the request is processed by the action method for the view.

BeginForm(HtmlHelper, String, String, Object, FormMethod, Object)

Writes an opening <form> tag to the response and sets the action tag to the specified controller, action, and route values. The form uses the specified HTTP method and includes the HTML attributes.

BeginForm(HtmlHelper, String, String, Object, FormMethod)

Writes an opening <form> tag to the response and sets the action tag to the specified controller, action, and route values. The form uses the specified HTTP method.

BeginForm(HtmlHelper, String, String, Object)

Writes an opening <form> tag to the response, and sets the action tag to the specified controller, action, and route values. The form uses the POST method.

BeginForm(HtmlHelper, String, String, FormMethod, IDictionary<String,Object>)

Writes an opening <form> tag to the response and sets the action tag to the specified controller and action. The form uses the specified HTTP method and includes the HTML attributes from a dictionary.

BeginForm(HtmlHelper, String, String, FormMethod, Object)

Writes an opening <form> tag to the response and sets the action tag to the specified controller and action. The form uses the specified HTTP method and includes the HTML attributes.

BeginForm(HtmlHelper, String, String, FormMethod)

Writes an opening <form> tag to the response and sets the action tag to the specified controller and action. The form uses the specified HTTP method.

BeginForm(HtmlHelper, String, String, RouteValueDictionary, FormMethod, IDictionary<String,Object>)

Writes an opening <form> tag to the response, and sets the action tag to the specified controller, action, and route values from the route value dictionary. The form uses the specified HTTP method, and includes the HTML attributes from the dictionary.

BeginForm(HtmlHelper, String, String, RouteValueDictionary, FormMethod)

Writes an opening <form> tag to the response, and sets the action tag to the specified controller, action, and route values from the route value dictionary. The form uses the specified HTTP method.

BeginForm(HtmlHelper, String, String, RouteValueDictionary)

Writes an opening <form> tag to the response, and sets the action tag to the specified controller, action, and route values from the route value dictionary. The form uses the POST method.

BeginForm(HtmlHelper, String, String)

Writes an opening <form> tag to the response and sets the action tag to the specified controller and action. The form uses the POST method.

BeginForm(HtmlHelper, RouteValueDictionary)

Writes an opening <form> tag to the response and includes the route values from the route value dictionary in the action attribute. The form uses the POST method, and the request is processed by the action method for the view.

BeginForm(HtmlHelper)

Writes an opening <form> tag to the response. The form uses the POST method, and the request is processed by the action method for the view.

BeginRouteForm(HtmlHelper, Object)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, Object, FormMethod, Object)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, Object, FormMethod)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, Object)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, FormMethod, IDictionary<String,Object>)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, FormMethod, Object)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, FormMethod)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, RouteValueDictionary, FormMethod, IDictionary<String,Object>)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, RouteValueDictionary, FormMethod)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String, RouteValueDictionary)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, String)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

BeginRouteForm(HtmlHelper, RouteValueDictionary)

Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target.

EndForm(HtmlHelper)

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

CheckBox(HtmlHelper, String, Boolean, IDictionary<String,Object>)

Returns a check box input element by using the specified HTML helper, the name of the form field, a value to indicate whether the check box is selected, and the HTML attributes.

CheckBox(HtmlHelper, String, Boolean, Object)

Returns a check box input element by using the specified HTML helper, the name of the form field, a value that indicates whether the check box is selected, and the HTML attributes.

CheckBox(HtmlHelper, String, Boolean)

Returns a check box input element by using the specified HTML helper, the name of the form field, and a value to indicate whether the check box is selected.

CheckBox(HtmlHelper, String, IDictionary<String,Object>)

Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes.

CheckBox(HtmlHelper, String, Object)

Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes.

CheckBox(HtmlHelper, String)

Returns a check box input element by using the specified HTML helper and the name of the form field.

Hidden(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Hidden(HtmlHelper, String, Object, Object)

Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Hidden(HtmlHelper, String, Object)

Returns a hidden input element by using the specified HTML helper, the name of the form field, and the value.

Hidden(HtmlHelper, String)

Returns a hidden input element by using the specified HTML helper and the name of the form field.

Password(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Password(HtmlHelper, String, Object, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Password(HtmlHelper, String, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, and the value.

Password(HtmlHelper, String)

Returns a password input element by using the specified HTML helper and the name of the form field.

RadioButton(HtmlHelper, String, Object, Boolean, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Boolean, Object)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Boolean)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Object)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object)

Returns a radio button input element that is used to present mutually exclusive options.

TextBox(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

TextBox(HtmlHelper, String, Object, Object)

Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

TextBox(HtmlHelper, String, Object, String, IDictionary<String,Object>)

Returns a text input element.

TextBox(HtmlHelper, String, Object, String, Object)

Returns a text input element.

TextBox(HtmlHelper, String, Object, String)

Returns a text input element.

TextBox(HtmlHelper, String, Object)

Returns a text input element by using the specified HTML helper, the name of the form field, and the value.

TextBox(HtmlHelper, String)

Returns a text input element by using the specified HTML helper and the name of the form field.

Label(HtmlHelper, String, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

Label(HtmlHelper, String, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

Label(HtmlHelper, String, String, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

Label(HtmlHelper, String, String, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

Label(HtmlHelper, String, String)

Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.

Label(HtmlHelper, String)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, String, IDictionary<String,Object>)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, String, Object)

Returns an HTML label element and the property name of the property that is represented by the specified expression.

LabelForModel(HtmlHelper, String)

Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.

LabelForModel(HtmlHelper)

Returns an HTML label element and the property name of the property that is represented by the model.

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

Returns an anchor element (a element) for the specified link text, action, route values, and HTML attributes.

ActionLink(HtmlHelper, String, String, Object)

Returns an anchor element (a element) for the specified link text, action, and route values.

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

Returns an anchor element (a element) for the specified link text, action, controller, route values, and HTML attributes.

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

Returns an anchor element (a element) for the specified link text, action, controller, protocol, host name, URL fragment, route values, and HTML attributes.

ActionLink(HtmlHelper, String, String, String, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) for the specified link text, action, controller, protocol, host name, URL fragment, route values as a route value dictionary, and HTML attributes as a dictionary.

ActionLink(HtmlHelper, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) for the specified link text, action, controller, route values as a route value dictionary, and HTML attributes as a dictionary.

ActionLink(HtmlHelper, String, String, String)

Returns an anchor element (a element) for the specified link text, action, and controller.

ActionLink(HtmlHelper, String, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) for the specified link text, action, route values as a route value dictionary, and HTML attributes as a dictionary.

ActionLink(HtmlHelper, String, String, RouteValueDictionary)

Returns an anchor element (a element) for the specified link text, action, and route values as a route value dictionary.

ActionLink(HtmlHelper, String, String)

Returns an anchor element (a element) for the specified link text and action.

RouteLink(HtmlHelper, String, Object, Object)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, Object)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, Object, Object)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, Object)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, String, String, String, Object, Object)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, String, String, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String, RouteValueDictionary)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, String)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, RouteValueDictionary, IDictionary<String,Object>)

Returns an anchor element (a element) that contains the virtual path of the specified action.

RouteLink(HtmlHelper, String, RouteValueDictionary)

Returns an anchor element (a element) that contains the virtual path of the specified action.

Id(HtmlHelper, String)

Gets the ID of the HtmlHelper string.

IdForModel(HtmlHelper)

Gets the ID of the HtmlHelper string.

Name(HtmlHelper, String)

Gets the full HTML field name for the object that is represented by the expression.

NameForModel(HtmlHelper)

Gets the full HTML field name for the object that is represented by the expression.

Partial(HtmlHelper, String, Object, ViewDataDictionary)

Renders the specified partial view as an HTML-encoded string.

Partial(HtmlHelper, String, Object)

Renders the specified partial view as an HTML-encoded string.

Partial(HtmlHelper, String, ViewDataDictionary)

Renders the specified partial view as an HTML-encoded string.

Partial(HtmlHelper, String)

Renders the specified partial view as an HTML-encoded string.

RenderPartial(HtmlHelper, String, Object, ViewDataDictionary)

Renders the specified partial view, replacing the partial view's ViewData property with the specified ViewDataDictionary object and setting the Model property of the view data to the specified model.

RenderPartial(HtmlHelper, String, Object)

Renders the specified partial view, passing it a copy of the current ViewDataDictionary object, but with the Model property set to the specified model.

RenderPartial(HtmlHelper, String, ViewDataDictionary)

Renders the specified partial view, replacing its ViewData property with the specified ViewDataDictionary object.

RenderPartial(HtmlHelper, String)

Renders the specified partial view by using the specified HTML helper.

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

Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes.

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

Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes.

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

Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes.

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

Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes.

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

Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and an option label.

DropDownList(HtmlHelper, String, IEnumerable<SelectListItem>)

Returns a single-selection select element using the specified HTML helper, the name of the form field, and the specified list items.

DropDownList(HtmlHelper, String, String)

Returns a single-selection select element using the specified HTML helper, the name of the form field, and an option label.

DropDownList(HtmlHelper, String)

Returns a single-selection select element using the specified HTML helper and the name of the form field.

ListBox(HtmlHelper, String, IEnumerable<SelectListItem>, IDictionary<String,Object>)

Returns a multi-select select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HMTL attributes.

ListBox(HtmlHelper, String, IEnumerable<SelectListItem>, Object)

Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items.

ListBox(HtmlHelper, String, IEnumerable<SelectListItem>)

Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items.

ListBox(HtmlHelper, String)

Returns a multi-select select element using the specified HTML helper and the name of the form field.

TextArea(HtmlHelper, String, IDictionary<String,Object>)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the specified HTML attributes.

TextArea(HtmlHelper, String, Object)

Returns the specified textarea element by using the specified HTML helper and HTML attributes.

TextArea(HtmlHelper, String, String, IDictionary<String,Object>)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes.

TextArea(HtmlHelper, String, String, Int32, Int32, IDictionary<String,Object>)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes.

TextArea(HtmlHelper, String, String, Int32, Int32, Object)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes.

TextArea(HtmlHelper, String, String, Object)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes.

TextArea(HtmlHelper, String, String)

Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content.

TextArea(HtmlHelper, String)

Returns the specified textarea element by using the specified HTML helper and the name of the form field.

Validate(HtmlHelper, String)

Retrieves the validation metadata for the specified model and applies each rule to the data field.

ValidationMessage(HtmlHelper, String, IDictionary<String,Object>, String)

Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, IDictionary<String,Object>)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, Object, String)

Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, Object)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String, IDictionary<String,Object>, String)

Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String, IDictionary<String,Object>)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String, Object, String)

Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String, Object)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String, String)

Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String, String)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationMessage(HtmlHelper, String)

Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.

ValidationSummary(HtmlHelper, Boolean, String, IDictionary<String,Object>, String)
ValidationSummary(HtmlHelper, Boolean, String, IDictionary<String,Object>)

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.

ValidationSummary(HtmlHelper, Boolean, String, Object, String)
ValidationSummary(HtmlHelper, Boolean, String, Object)

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.

ValidationSummary(HtmlHelper, Boolean, String, String)
ValidationSummary(HtmlHelper, Boolean, String)

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.

ValidationSummary(HtmlHelper, Boolean)

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.

ValidationSummary(HtmlHelper, String, IDictionary<String,Object>, String)
ValidationSummary(HtmlHelper, String, IDictionary<String,Object>)

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

ValidationSummary(HtmlHelper, String, Object, String)
ValidationSummary(HtmlHelper, String, Object)

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

ValidationSummary(HtmlHelper, String, String)
ValidationSummary(HtmlHelper, String)

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

ValidationSummary(HtmlHelper)

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

Value(HtmlHelper, String, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

Value(HtmlHelper, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

ValueForModel(HtmlHelper, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

ValueForModel(HtmlHelper)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

Applies to