Export (0) Print
Expand All

HtmlHelper Methods

The HtmlHelper type exposes the following members.

  NameDescription
Public method AntiForgeryToken Overloaded. Generates a hidden form field (anti-forgery token) that is validated when the form is submitted.
Public method AttributeEncode Overloaded. Converts the specified attribute value to an HTML-encoded string.
Public method Encode Overloaded. Converts the specified value to an HTML-encoded string.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member GenerateLink Overloaded. Generates an HTML anchor element (a element) that links to an action method.
Public method Static member GenerateRouteLink Overloaded. Generates an HTML anchor element (a element) that links to a URL route.
Public method Static member GetFormMethodString Converts the HTTP method for handling form input (either GET or POST) to a string.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method Static member GetInputTypeString Converts the HTML input control type to a string.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a String that represents the current Object. (Inherited from Object.)
Top

  NameDescription
Public Extension Method ActionLink(String, String) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, RouteValueDictionary) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, String) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, String, String, String, String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method ActionLink(String, String, String, String, String, String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method BeginForm() Overloaded. Writes an opening <form> tag to the response, which will be handled by an action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by an action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(RouteValueDictionary) Overloaded. Writes an opening <form> tag to the response, which will be handled by an action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, RouteValueDictionary) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, Object, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, RouteValueDictionary, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, FormMethod, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, FormMethod, IDictionary<String, Object>) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, Object, FormMethod, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginForm(String, String, RouteValueDictionary, FormMethod, IDictionary<String, Object>) Overloaded. Writes an opening <form> tag to the response, which will be handled by the specified action method. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(RouteValueDictionary) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, RouteValueDictionary) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, Object, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, RouteValueDictionary, FormMethod) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, FormMethod, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, FormMethod, IDictionary<String, Object>) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, Object, FormMethod, Object) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method BeginRouteForm(String, RouteValueDictionary, FormMethod, IDictionary<String, Object>) Overloaded. Writes an opening <form> tag to the response, which will be handled by the route target.. (Defined by FormExtensions.)
Public Extension Method CheckBox(String) Overloaded. Returns a check box input element by using the specified HTML helper and the name of the form field. (Defined by InputExtensions.)
Public Extension Method CheckBox(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.)
Public Extension Method CheckBox(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.)
Public Extension Method CheckBox(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.)
Public Extension Method CheckBox(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.)
Public Extension Method CheckBox(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.)
Public Extension Method DropDownList(String) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper and the name of the form field. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, String) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, and an option label. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, and the specified list items. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>, String) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, the specified list items, and an option label. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>, Object) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>, IDictionary<String, Object>) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. (Defined by SelectExtensions.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>, String, Object) Overloaded. Returns a select element that lets users select one item, by 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.)
Public Extension Method DropDownList(String, IEnumerable<SelectListItem>, String, IDictionary<String, Object>) Overloaded. Returns a select element that lets users select one item, by 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.)
Public Extension Method EndForm Renders the closing </form> tag to the response. (Defined by FormExtensions.)
Public Extension Method Hidden(String) Overloaded. Returns a hidden input element by using the specified HTML helper and the name of the form field. (Defined by InputExtensions.)
Public Extension Method Hidden(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.)
Public Extension Method Hidden(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.)
Public Extension Method Hidden(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.)
Public Extension Method ListBox(String) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper and the name of the form field. (Defined by SelectExtensions.)
Public Extension Method ListBox(String, IEnumerable<SelectListItem>) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, and the specified list items. (Defined by SelectExtensions.)
Public Extension Method ListBox(String, IEnumerable<SelectListItem>, Object) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, and the specified list items. (Defined by SelectExtensions.)
Public Extension Method ListBox(String, IEnumerable<SelectListItem>, IDictionary<String, Object>) Overloaded. Returns a select element that lets users select one item, by using the specified HTML helper, the name of the form field, the specified list items, and the specified HMTL attributes. (Defined by SelectExtensions.)
Public Extension Method Password(String) Overloaded. Returns a password input element by using the specified HTML helper and the name of the form field. (Defined by InputExtensions.)
Public Extension Method Password(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.)
Public Extension Method Password(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.)
Public Extension Method Password(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.)
Public Extension Method RadioButton(String, Object) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RadioButton(String, Object, Object) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RadioButton(String, Object, IDictionary<String, Object>) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RadioButton(String, Object, Boolean) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RadioButton(String, Object, Boolean, Object) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RadioButton(String, Object, Boolean, IDictionary<String, Object>) Overloaded. Returns a radio button input element that is used to present mutually exclusive options. (Defined by InputExtensions.)
Public Extension Method RenderPartial(String) Overloaded. Renders the specified partial view by using the specified HMTL helper. (Defined by RenderPartialExtensions.)
Public Extension Method RenderPartial(String, ViewDataDictionary) Overloaded. Renders the specified partial view, replacing its ViewData property with the specified ViewDataDictionary object. (Defined by RenderPartialExtensions.)
Public Extension Method RenderPartial(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.)
Public Extension Method RenderPartial(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.)
Public Extension Method RouteLink(String, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, RouteValueDictionary) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, RouteValueDictionary) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, String, String, String, Object, Object) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method RouteLink(String, String, String, String, String, RouteValueDictionary, IDictionary<String, Object>) Overloaded. Returns an anchor element (a element) that contains the virtual path of the specified action. (Defined by LinkExtensions.)
Public Extension Method TextArea(String) Overloaded. Returns the specified textarea element by using the specified HTML helper and the name of the form field. (Defined by TextAreaExtensions.)
Public Extension Method TextArea(String, Object) Overloaded. Returns the specified textarea element by using the specified HTML helper and HTML attributes. (Defined by TextAreaExtensions.)
Public Extension Method TextArea(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.)
Public Extension Method TextArea(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.)
Public Extension Method TextArea(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.)
Public Extension Method TextArea(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.)
Public Extension Method TextArea(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.)
Public Extension Method TextArea(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.)
Public Extension Method TextBox(String) Overloaded. Returns a text input element by using the specified HTML helper and the name of the form field. (Defined by InputExtensions.)
Public Extension Method TextBox(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.)
Public Extension Method TextBox(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.)
Public Extension Method TextBox(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.)
Public Extension Method ValidationMessage(String) Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationMessage(String, Object) Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationMessage(String, String) Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationMessage(String, IDictionary<String, Object>) Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationMessage(String, String, Object) Overloaded. Displays a validation message if an error exists for the specified field in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationMessage(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.)
Public Extension Method ValidationSummary() Overloaded. Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationSummary(String) Overloaded. Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationSummary(String, Object) Overloaded. Returns an unordered list (ul element) of validation messages in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Public Extension Method ValidationSummary(String, IDictionary<String, Object>) Overloaded. Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object. (Defined by ValidationExtensions.)
Top

Community Additions

Show:
© 2014 Microsoft