HtmlHelperFormExtensions.BeginForm HtmlHelperFormExtensions.BeginForm HtmlHelperFormExtensions.BeginForm Method

Definition

Overloads

BeginForm(IHtmlHelper) BeginForm(IHtmlHelper) BeginForm(IHtmlHelper)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

BeginForm(IHtmlHelper, String, String, Object, FormMethod) BeginForm(IHtmlHelper, String, String, Object, FormMethod) BeginForm(IHtmlHelper, String, String, Object, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String, Object) BeginForm(IHtmlHelper, String, String, Object) BeginForm(IHtmlHelper, String, String, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, String, String, FormMethod) BeginForm(IHtmlHelper, String, String, FormMethod) BeginForm(IHtmlHelper, String, String, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object) BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object) BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, String, String, FormMethod, Object) BeginForm(IHtmlHelper, String, String, FormMethod, Object) BeginForm(IHtmlHelper, String, String, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper, FormMethod, Object) BeginForm(IHtmlHelper, FormMethod, Object) BeginForm(IHtmlHelper, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, Object) BeginForm(IHtmlHelper, Object) BeginForm(IHtmlHelper, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, Nullable<Boolean>) BeginForm(IHtmlHelper, Nullable<Boolean>) BeginForm(IHtmlHelper, Nullable<Boolean>)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

BeginForm(IHtmlHelper, FormMethod) BeginForm(IHtmlHelper, FormMethod) BeginForm(IHtmlHelper, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

BeginForm(IHtmlHelper, String, String) BeginForm(IHtmlHelper, String, String) BeginForm(IHtmlHelper, String, String)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

BeginForm(IHtmlHelper) BeginForm(IHtmlHelper) BeginForm(IHtmlHelper)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, String, String, Object, FormMethod) BeginForm(IHtmlHelper, String, String, Object, FormMethod) BeginForm(IHtmlHelper, String, String, Object, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * obj * Microsoft.AspNetCore.Mvc.Rendering.FormMethod -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, actionName As String, controllerName As String, routeValues As Object, method As FormMethod) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

actionName
String String String

The name of the action method.

controllerName
String String String

The name of the controller.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, String, String, Object) BeginForm(IHtmlHelper, String, String, Object) BeginForm(IHtmlHelper, String, String, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, object routeValues);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, actionName As String, controllerName As String, routeValues As Object) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

actionName
String String String

The name of the action method.

controllerName
String String String

The name of the controller.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, String, String, FormMethod) BeginForm(IHtmlHelper, String, String, FormMethod) BeginForm(IHtmlHelper, String, String, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * Microsoft.AspNetCore.Mvc.Rendering.FormMethod -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, actionName As String, controllerName As String, method As FormMethod) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

actionName
String String String

The name of the action method.

controllerName
String String String

The name of the controller.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object) BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object) BeginForm(IHtmlHelper, FormMethod, Nullable<Boolean>, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, Nullable<bool> antiforgery, object htmlAttributes);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * Microsoft.AspNetCore.Mvc.Rendering.FormMethod * Nullable<bool> * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, method As FormMethod, antiforgery As Nullable(Of Boolean), htmlAttributes As Object) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

antiforgery
Nullable<Boolean>

If true, <form> elements will include an antiforgery token. If false, suppresses the generation an <input> of type "hidden" with an antiforgery token. If null, <form> elements will include an antiforgery token only if method is not Get.

htmlAttributes
Object Object Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, String, String, FormMethod, Object) BeginForm(IHtmlHelper, String, String, FormMethod, Object) BeginForm(IHtmlHelper, String, String, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, object htmlAttributes);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * Microsoft.AspNetCore.Mvc.Rendering.FormMethod * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, actionName As String, controllerName As String, method As FormMethod, htmlAttributes As Object) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

actionName
String String String

The name of the action method.

controllerName
String String String

The name of the controller.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

htmlAttributes
Object Object Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, FormMethod, Object) BeginForm(IHtmlHelper, FormMethod, Object) BeginForm(IHtmlHelper, FormMethod, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, object htmlAttributes);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * Microsoft.AspNetCore.Mvc.Rendering.FormMethod * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, method As FormMethod, htmlAttributes As Object) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

htmlAttributes
Object Object Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, Object) BeginForm(IHtmlHelper, Object) BeginForm(IHtmlHelper, Object)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object routeValues);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, routeValues As Object) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, Nullable<Boolean>) BeginForm(IHtmlHelper, Nullable<Boolean>) BeginForm(IHtmlHelper, Nullable<Boolean>)

Renders a <form> start tag to the response. The <form>'s action attribute value will match the current request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Nullable<bool> antiforgery);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * Nullable<bool> -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, antiforgery As Nullable(Of Boolean)) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

antiforgery
Nullable<Boolean>

If true, <form> elements will include an antiforgery token. If false, suppresses the generation an <input> of type "hidden" with an antiforgery token. If null, <form> elements will include an antiforgery token.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, FormMethod) BeginForm(IHtmlHelper, FormMethod) BeginForm(IHtmlHelper, FormMethod)

Renders a <form> start tag to the response. When the user submits the form, the current action will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * Microsoft.AspNetCore.Mvc.Rendering.FormMethod -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, method As FormMethod) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

method
FormMethod FormMethod FormMethod

The HTTP method for processing the form, either GET or POST.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

BeginForm(IHtmlHelper, String, String) BeginForm(IHtmlHelper, String, String) BeginForm(IHtmlHelper, String, String)

Renders a <form> start tag to the response. When the user submits the form, the action with name actionName will process the request.

public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName);
static member BeginForm : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
<Extension()>
Public Function BeginForm (htmlHelper As IHtmlHelper, actionName As String, controllerName As String) As MvcForm

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

actionName
String String String

The name of the action method.

controllerName
String String String

The name of the controller.

Returns

An MvcForm instance which renders the </form> end tag when disposed.

Remarks

In this context, "renders" means the method writes its output using Writer.

Applies to