Share via


DefaultHtmlGenerator.GeneratePageForm Method

Definition

Generate a <form> element. When the user submits the form, the page with name pageName will process the request.

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GeneratePageForm(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ pageName, System::String ^ pageHandler, System::Object ^ routeValues, System::String ^ fragment, System::String ^ method, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePageForm (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string pageName, string pageHandler, object routeValues, string fragment, string method, object htmlAttributes);
abstract member GeneratePageForm : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * obj * string * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GeneratePageForm : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * obj * string * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GeneratePageForm (viewContext As ViewContext, pageName As String, pageHandler As String, routeValues As Object, fragment As String, method As String, htmlAttributes As Object) As TagBuilder

Parameters

viewContext
ViewContext

A ViewContext instance for the current scope.

pageName
String

The name of the page.

pageHandler
String

The page handler to generate a form for.

routeValues
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.

fragment
String

The url fragment.

method
String

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

htmlAttributes
Object

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

Returns

A TagBuilder instance for the </form> element.

Implements

Applies to