Export (0) Print
Expand All

FormExtensions Class

Represents support for HTML in an application.

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

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

public static class FormExtensions

The FormExtensions type exposes the following members.

  NameDescription
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberBeginRouteForm(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.
Public methodStatic memberEndFormRenders the closing </form> tag to the response.
Top

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.
Show:
© 2014 Microsoft