Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HtmlHelper Class

 

Supports the rendering of HTML controls in a view.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)


No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubmethodHtmlHelper(ViewContext, IViewDataContainer)

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

System_CAPS_pubmethodHtmlHelper(ViewContext, IViewDataContainer, RouteCollection)

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

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticClientValidationEnabled

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

System_CAPS_pubpropertyHtml5DateRenderingMode

Gets or sets the HTML5 date rendering mode.

System_CAPS_pubpropertySystem_CAPS_staticIdAttributeDotReplacement

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

System_CAPS_pubpropertyRouteCollection

Gets or sets the collection of routes for the application.

System_CAPS_pubpropertySystem_CAPS_staticUnobtrusiveJavaScriptEnabled

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

System_CAPS_pubpropertySystem_CAPS_staticValidationMessageElement

Element name used to wrap the validation message generated by ValidationMessage and other overloads.

System_CAPS_pubpropertySystem_CAPS_staticValidationSummaryMessageElement

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

System_CAPS_pubpropertyViewBag

Gets the view bag.

System_CAPS_pubpropertyViewContext

Gets or sets the context information about the view.

System_CAPS_pubpropertyViewData

Gets the current view data dictionary.

System_CAPS_pubpropertyViewDataContainer

Gets or sets the view data container.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAnonymousObjectToHtmlAttributes(Object)

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

System_CAPS_pubmethodAntiForgeryToken()

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

System_CAPS_pubmethodAttributeEncode(Object)

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

System_CAPS_pubmethodAttributeEncode(String)

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

System_CAPS_pubmethodEnableClientValidation()

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

System_CAPS_pubmethodEnableClientValidation(Boolean)

Enables or disables client validation.

System_CAPS_pubmethodEnableUnobtrusiveJavaScript()

Enables or disables unobtrusive JavaScript.

System_CAPS_pubmethodEnableUnobtrusiveJavaScript(Boolean)

Enables or disables unobtrusive JavaScript.

System_CAPS_pubmethodEncode(Object)

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

System_CAPS_pubmethodEncode(String)

Converts the specified string to an HTML-encoded string.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodFormatValue(Object, String)

Formats the value.

System_CAPS_pubmethodSystem_CAPS_staticGenerateIdFromName(String)

Creates an HTML element ID using the specified element name.

System_CAPS_pubmethodSystem_CAPS_staticGenerateIdFromName(String, String)

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

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

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

System_CAPS_pubmethodSystem_CAPS_staticGenerateLink(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.

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

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

System_CAPS_pubmethodSystem_CAPS_staticGenerateRouteLink(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.

System_CAPS_pubmethodSystem_CAPS_staticGetFormMethodString(FormMethod)

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

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetInputTypeString(InputType)

Returns the HTML input control type as a string.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetUnobtrusiveValidationAttributes(String)

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

System_CAPS_pubmethodGetUnobtrusiveValidationAttributes(String, ModelMetadata)

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

System_CAPS_pubmethodHttpMethodOverride(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.

System_CAPS_pubmethodHttpMethodOverride(String)

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

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticObjectToDictionary(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.

System_CAPS_pubmethodRaw(Object)

Returns markup that is not HTML encoded.

System_CAPS_pubmethodRaw(String)

Returns markup that is not HTML encoded.

System_CAPS_pubmethodSetValidationMessageElement(String)

Set element name used to wrap the validation message generated by ValidationMessage and other overloads.

System_CAPS_pubmethodSetValidationSummaryMessageElement(String)

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

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticValidationInputCssClassName

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

System_CAPS_pubfieldSystem_CAPS_staticValidationInputValidCssClassName

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

System_CAPS_pubfieldSystem_CAPS_staticValidationMessageCssClassName

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

System_CAPS_pubfieldSystem_CAPS_staticValidationMessageValidCssClassName

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

System_CAPS_pubfieldSystem_CAPS_staticValidationSummaryCssClassName

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

System_CAPS_pubfieldSystem_CAPS_staticValidationSummaryValidCssClassName

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

NameDescription
System_CAPS_pubmethodAction(String)

Overloaded. Invokes the specified child action method and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodAction(String, Object)

Overloaded. Invokes the specified child action method with the specified parameters and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodAction(String, RouteValueDictionary)

Overloaded. Invokes the specified child action method using the specified parameters and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodAction(String, String)

Overloaded. Invokes the specified child action method using the specified controller name and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodAction(String, String, Object)

Overloaded. Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodAction(String, String, RouteValueDictionary)

Overloaded. Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodActionLink(String, String)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, RouteValueDictionary)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, String)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, String, String, String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, String, String, String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodBeginForm()

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(Object)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(RouteValueDictionary)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, FormMethod)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, FormMethod, IDictionary<String, Object>)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, FormMethod, Object)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, Object)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, Object, FormMethod)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, Object, FormMethod, Object)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, RouteValueDictionary)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, RouteValueDictionary, FormMethod)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginForm(String, String, RouteValueDictionary, FormMethod, IDictionary<String, Object>)

Overloaded. 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.(Defined by FormExtensions.)

System_CAPS_pubmethodBeginRouteForm(Object)

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

System_CAPS_pubmethodBeginRouteForm(RouteValueDictionary)

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

System_CAPS_pubmethodBeginRouteForm(String)

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

System_CAPS_pubmethodBeginRouteForm(String, FormMethod)

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

System_CAPS_pubmethodBeginRouteForm(String, FormMethod, IDictionary<String, Object>)

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

System_CAPS_pubmethodBeginRouteForm(String, FormMethod, Object)

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

System_CAPS_pubmethodBeginRouteForm(String, Object)

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

System_CAPS_pubmethodBeginRouteForm(String, Object, FormMethod)

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

System_CAPS_pubmethodBeginRouteForm(String, Object, FormMethod, Object)

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

System_CAPS_pubmethodBeginRouteForm(String, RouteValueDictionary)

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

System_CAPS_pubmethodBeginRouteForm(String, RouteValueDictionary, FormMethod)

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

System_CAPS_pubmethodBeginRouteForm(String, RouteValueDictionary, FormMethod, IDictionary<String, Object>)

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

System_CAPS_pubmethodCheckBox(String)

Overloaded. Returns a check box input element by using the specified HTML helper and the name of the form field.(Defined by InputExtensions.)

System_CAPS_pubmethodCheckBox(String, Boolean)

Overloaded. 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.(Defined by InputExtensions.)

System_CAPS_pubmethodCheckBox(String, Boolean, IDictionary<String, Object>)

Overloaded. 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.(Defined by InputExtensions.)

System_CAPS_pubmethodCheckBox(String, Boolean, Object)

Overloaded. 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.(Defined by InputExtensions.)

System_CAPS_pubmethodCheckBox(String, IDictionary<String, Object>)

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

System_CAPS_pubmethodCheckBox(String, Object)

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

System_CAPS_pubmethodDisplay(String)

Overloaded. Returns HTML markup for each property in the object that is represented by a string expression.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplay(String, Object)

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

System_CAPS_pubmethodDisplay(String, String)

Overloaded. Returns HTML markup for each property in the object that is represented by the expression, using the specified template.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplay(String, String, Object)

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

System_CAPS_pubmethodDisplay(String, String, String)

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

System_CAPS_pubmethodDisplay(String, String, String, Object)

Overloaded. 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.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel()

Overloaded. Returns HTML markup for each property in the model.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel(Object)

Overloaded. Returns HTML markup for each property in the model, using additional view data.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel(String)

Overloaded. Returns HTML markup for each property in the model using the specified template.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel(String, Object)

Overloaded. Returns HTML markup for each property in the model, using the specified template and additional view data.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel(String, String)

Overloaded. Returns HTML markup for each property in the model using the specified template and HTML field ID.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayForModel(String, String, Object)

Overloaded. Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data.(Defined by DisplayExtensions.)

System_CAPS_pubmethodDisplayName(String)

Gets the display name.(Defined by DisplayNameExtensions.)

System_CAPS_pubmethodDisplayNameForModel()

Gets the display name for the model.(Defined by DisplayNameExtensions.)

System_CAPS_pubmethodDisplayText(String)

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

System_CAPS_pubmethodDropDownList(String)

Overloaded. Returns a single-selection select element using the specified HTML helper and the name of the form field.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, IEnumerable<SelectListItem>)

Overloaded. Returns a single-selection select element using the specified HTML helper, the name of the form field, and the specified list items.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, IEnumerable<SelectListItem>, IDictionary<String, Object>)

Overloaded. 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.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, IEnumerable<SelectListItem>, Object)

Overloaded. 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.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, IEnumerable<SelectListItem>, String)

Overloaded. 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.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, IEnumerable<SelectListItem>, String, IDictionary<String, Object>)

Overloaded. 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.(Defined by SelectExtensions.)

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

Overloaded. 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.(Defined by SelectExtensions.)

System_CAPS_pubmethodDropDownList(String, String)

Overloaded. Returns a single-selection select element using the specified HTML helper, the name of the form field, and an option label.(Defined by SelectExtensions.)

System_CAPS_pubmethodEditor(String)

Overloaded. Returns an HTML input element for each property in the object that is represented by the expression.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditor(String, Object)

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

System_CAPS_pubmethodEditor(String, String)

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

System_CAPS_pubmethodEditor(String, String, Object)

Overloaded. 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.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditor(String, String, String)

Overloaded. 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.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditor(String, String, String, Object)

Overloaded. 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.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel()

Overloaded. Returns an HTML input element for each property in the model.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel(Object)

Overloaded. Returns an HTML input element for each property in the model, using additional view data.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel(String)

Overloaded. Returns an HTML input element for each property in the model, using the specified template.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel(String, Object)

Overloaded. Returns an HTML input element for each property in the model, using the specified template and additional view data.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel(String, String)

Overloaded. Returns an HTML input element for each property in the model, using the specified template name and HTML field name.(Defined by EditorExtensions.)

System_CAPS_pubmethodEditorForModel(String, String, Object)

Overloaded. Returns an HTML input element for each property in the model, using the template name, HTML field name, and additional view data.(Defined by EditorExtensions.)

System_CAPS_pubmethodEndForm()

Renders the closing </form> tag to the response. (Defined by FormExtensions.)

System_CAPS_pubmethodHidden(String)

Overloaded. Returns a hidden input element by using the specified HTML helper and the name of the form field.(Defined by InputExtensions.)

System_CAPS_pubmethodHidden(String, Object)

Overloaded. Returns a hidden input element by using the specified HTML helper, the name of the form field, and the value.(Defined by InputExtensions.)

System_CAPS_pubmethodHidden(String, Object, IDictionary<String, Object>)

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

System_CAPS_pubmethodHidden(String, Object, Object)

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

System_CAPS_pubmethodId(String)

Gets the ID of the HtmlHelper string.(Defined by NameExtensions.)

System_CAPS_pubmethodIdForModel()

Gets the ID of the HtmlHelper string.(Defined by NameExtensions.)

System_CAPS_pubmethodLabel(String)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabel(String, IDictionary<String, Object>)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabel(String, Object)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabel(String, String)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabel(String, String, IDictionary<String, Object>)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabel(String, String, Object)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel()

Overloaded. Returns an HTML label element and the property name of the property that is represented by the model.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel(IDictionary<String, Object>)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel(Object)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel(String)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression using the label text.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel(String, IDictionary<String, Object>)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodLabelForModel(String, Object)

Overloaded. Returns an HTML label element and the property name of the property that is represented by the specified expression.(Defined by LabelExtensions.)

System_CAPS_pubmethodListBox(String)

Overloaded. Returns a multi-select select element using the specified HTML helper and the name of the form field.(Defined by SelectExtensions.)

System_CAPS_pubmethodListBox(String, IEnumerable<SelectListItem>)

Overloaded. Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items.(Defined by SelectExtensions.)

System_CAPS_pubmethodListBox(String, IEnumerable<SelectListItem>, IDictionary<String, Object>)

Overloaded. 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.(Defined by SelectExtensions.)

System_CAPS_pubmethodListBox(String, IEnumerable<SelectListItem>, Object)

Overloaded. Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items.(Defined by SelectExtensions.)

System_CAPS_pubmethodName(String)

Gets the full HTML field name for the object that is represented by the expression.(Defined by NameExtensions.)

System_CAPS_pubmethodNameForModel()

Gets the full HTML field name for the object that is represented by the expression.(Defined by NameExtensions.)

System_CAPS_pubmethodPartial(String)

Overloaded. Renders the specified partial view as an HTML-encoded string.(Defined by PartialExtensions.)

System_CAPS_pubmethodPartial(String, Object)

Overloaded. Renders the specified partial view as an HTML-encoded string.(Defined by PartialExtensions.)

System_CAPS_pubmethodPartial(String, Object, ViewDataDictionary)

Overloaded. Renders the specified partial view as an HTML-encoded string.(Defined by PartialExtensions.)

System_CAPS_pubmethodPartial(String, ViewDataDictionary)

Overloaded. Renders the specified partial view as an HTML-encoded string.(Defined by PartialExtensions.)

System_CAPS_pubmethodPassword(String)

Overloaded. Returns a password input element by using the specified HTML helper and the name of the form field.(Defined by InputExtensions.)

System_CAPS_pubmethodPassword(String, Object)

Overloaded. Returns a password input element by using the specified HTML helper, the name of the form field, and the value.(Defined by InputExtensions.)

System_CAPS_pubmethodPassword(String, Object, IDictionary<String, Object>)

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

System_CAPS_pubmethodPassword(String, Object, Object)

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

System_CAPS_pubmethodRadioButton(String, Object)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRadioButton(String, Object, Boolean)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRadioButton(String, Object, Boolean, IDictionary<String, Object>)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRadioButton(String, Object, Boolean, Object)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRadioButton(String, Object, IDictionary<String, Object>)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRadioButton(String, Object, Object)

Overloaded. Returns a radio button input element that is used to present mutually exclusive options.(Defined by InputExtensions.)

System_CAPS_pubmethodRenderAction(String)

Overloaded. Invokes the specified child action method and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderAction(String, Object)

Overloaded. Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderAction(String, RouteValueDictionary)

Overloaded. Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderAction(String, String)

Overloaded. Invokes the specified child action method using the specified controller name and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderAction(String, String, Object)

Overloaded. Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderAction(String, String, RouteValueDictionary)

Overloaded. Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.(Defined by ChildActionExtensions.)

System_CAPS_pubmethodRenderPartial(String)

Overloaded. Renders the specified partial view by using the specified HTML helper.(Defined by RenderPartialExtensions.)

System_CAPS_pubmethodRenderPartial(String, Object)

Overloaded. Renders the specified partial view, passing it a copy of the current ViewDataDictionary object, but with the Model property set to the specified model.(Defined by RenderPartialExtensions.)

System_CAPS_pubmethodRenderPartial(String, Object, ViewDataDictionary)

Overloaded. 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.(Defined by RenderPartialExtensions.)

System_CAPS_pubmethodRenderPartial(String, ViewDataDictionary)

Overloaded. Renders the specified partial view, replacing its ViewData property with the specified ViewDataDictionary object.(Defined by RenderPartialExtensions.)

System_CAPS_pubmethodRouteLink(String, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, RouteValueDictionary)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, RouteValueDictionary)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, String, String, String, Object, Object)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodRouteLink(String, String, String, String, String, RouteValueDictionary, IDictionary<String, Object>)

Overloaded. (Defined by LinkExtensions.)

System_CAPS_pubmethodTextArea(String)

Overloaded. Returns the specified textarea element by using the specified HTML helper and the name of the form field.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, IDictionary<String, Object>)

Overloaded. Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the specified HTML attributes.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, Object)

Overloaded. Returns the specified textarea element by using the specified HTML helper and HTML attributes.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, String)

Overloaded. Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, String, IDictionary<String, Object>)

Overloaded. 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.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, String, Int32, Int32, IDictionary<String, Object>)

Overloaded. 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.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, String, Int32, Int32, Object)

Overloaded. 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.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextArea(String, String, Object)

Overloaded. 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.(Defined by TextAreaExtensions.)

System_CAPS_pubmethodTextBox(String)

Overloaded. Returns a text input element by using the specified HTML helper and the name of the form field.(Defined by InputExtensions.)

System_CAPS_pubmethodTextBox(String, Object)

Overloaded. Returns a text input element by using the specified HTML helper, the name of the form field, and the value.(Defined by InputExtensions.)

System_CAPS_pubmethodTextBox(String, Object, IDictionary<String, Object>)

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

System_CAPS_pubmethodTextBox(String, Object, Object)

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

System_CAPS_pubmethodTextBox(String, Object, String)

Overloaded. Returns a text input element.(Defined by InputExtensions.)

System_CAPS_pubmethodTextBox(String, Object, String, IDictionary<String, Object>)

Overloaded. Returns a text input element.(Defined by InputExtensions.)

System_CAPS_pubmethodTextBox(String, Object, String, Object)

Overloaded. Returns a text input element.(Defined by InputExtensions.)

System_CAPS_pubmethodValidate(String)

Retrieves the validation metadata for the specified model and applies each rule to the data field.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, IDictionary<String, Object>)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, IDictionary<String, Object>, String)

Overloaded. Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, Object)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, Object, String)

Overloaded. Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String, IDictionary<String, Object>)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String, IDictionary<String, Object>, String)

Overloaded. Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String, Object)

Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String, Object, String)

Overloaded. Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationMessage(String, String, String)

Overloaded. Displays a validation message if an error exists for the specified entry in the ModelStateDictionary object.(Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary()

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

System_CAPS_pubmethodValidationSummary(Boolean)

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

System_CAPS_pubmethodValidationSummary(Boolean, String)

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

System_CAPS_pubmethodValidationSummary(Boolean, String, IDictionary<String, Object>)

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

System_CAPS_pubmethodValidationSummary(Boolean, String, IDictionary<String, Object>, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary(Boolean, String, Object)

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

System_CAPS_pubmethodValidationSummary(Boolean, String, Object, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary(Boolean, String, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary(String)

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

System_CAPS_pubmethodValidationSummary(String, IDictionary<String, Object>)

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

System_CAPS_pubmethodValidationSummary(String, IDictionary<String, Object>, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary(String, Object)

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

System_CAPS_pubmethodValidationSummary(String, Object, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValidationSummary(String, String)

Overloaded. (Defined by ValidationExtensions.)

System_CAPS_pubmethodValue(String)

Overloaded. Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.(Defined by ValueExtensions.)

System_CAPS_pubmethodValue(String, String)

Overloaded. Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.(Defined by ValueExtensions.)

System_CAPS_pubmethodValueForModel()

Overloaded. Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.(Defined by ValueExtensions.)

System_CAPS_pubmethodValueForModel(String)

Overloaded. Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.(Defined by ValueExtensions.)

The HtmlHelper class provides methods that help you create HTML controls programmatically. All HtmlHelper methods generate HTML and return the result as a string.

System_CAPS_noteNote

The HtmlHelper class is designed to generate UI. It should not be used in controllers or models.

Extension methods for the HtmlHelper class are in the System.Web.Mvc.Html namespace. These extensions add helper methods for creating forms, rendering HTML controls, rendering partial views, performing input validation, and more.

You can use the HtmlHelper class in a view by using the built-in Html property of the view. For example, calling @Html.ValidationSummary() renders a summary of validation messages.

When using an extension method to render an HTML element that includes a value, it is important to understand how that value is retrieved. For elements other than a password element (such as a text box or radio button), the value is retrieved in this order - the ModelStateDictionary object, the value of the value parameter in the extension method, the ViewDataDictionary object, and lastly, a value attribute in the html attributes. For a password element, the value of the element is retrieved from the value parameter in the extension method, or the the value attribute in the html attributes if the parameter is not provided.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2015 Microsoft