FormExtensionsBeginForm Method |
Writes an opening form tag to the response.
Namespace: Kentico.Forms.Web.Mvc.InternalAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax public static UpdatableMvcForm BeginForm(
this ExtensionPoint<HtmlHelper> instance,
string formId,
string updateTargetId,
string actionName = null,
string controllerName = null,
RouteValueDictionary routeValues = null,
FormMethod formMethod = FormMethod.Post,
IDictionary<string, Object> htmlAttributes = null
)
Parameters
- instance
- Type: Kentico.Web.MvcExtensionPointHtmlHelper
HtmlHelper extension point. - formId
- Type: SystemString
Gets or sets element's ID for the form. - updateTargetId
- Type: SystemString
Gets or sets the ID of the DOM element to update by using the response from the server when form needs to be re-rendered e.g. due to the application of visibility condition.
- actionName (Optional)
- Type: SystemString
The name of the action method that will handle the request. - controllerName (Optional)
- Type: SystemString
The name of the controller that will handle the request. - routeValues (Optional)
- Type: System.Web.RoutingRouteValueDictionary
An object that contains the parameters for a route. - formMethod (Optional)
- Type: FormMethod
Enumeration of the HTTP request types for a form. - htmlAttributes (Optional)
- Type: System.Collections.GenericIDictionaryString, Object
An object that contains the HTML attributes to set for the element.
Return Value
Type:
UpdatableMvcFormReturns an object representing updatable form.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ExtensionPointHtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions See Also