FormExtensions Class

 

Represents support for HTML in an application.

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

System.Object
  System.Web.Mvc.Html.FormExtensions

public static class FormExtensions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticBeginForm(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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

System_CAPS_pubmethodSystem_CAPS_staticEndForm(HtmlHelper)

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

The FormExtensions class contains methods that extend the HtmlHelper class. Each extension method renders an HTML form element. The BeginForm method renders a form that will be handled by a controller action method. The BeginRouteForm method renders a form that will be handled by the URL that is identified by specified route parameters. The EndForm method renders the closing element for a form.

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: