Compartir a través de


IHtmlGenerator.GenerateRouteForm Método

Definición

Generar un <elemento de formulario> . La ruta con nombre routeName genera el <valor de atributo del action formulario>.

public:
 Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateRouteForm(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ routeName, System::Object ^ routeValues, System::String ^ method, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteForm (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string routeName, object routeValues, string method, object htmlAttributes);
abstract member GenerateRouteForm : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * obj * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Function GenerateRouteForm (viewContext As ViewContext, routeName As String, routeValues As Object, method As String, htmlAttributes As Object) As TagBuilder

Parámetros

viewContext
ViewContext

Una ViewContext instancia del ámbito actual.

routeName
String

Nombre de la ruta.

routeValues
Object

que Object contiene los parámetros de una ruta. Los parámetros se recuperan mediante reflexión mediante el examen de las propiedades de Object. Normalmente se Object crea mediante la Object sintaxis del inicializador. Como alternativa, una IDictionary<TKey,TValue> instancia que contiene los parámetros de ruta.

method
String

Método HTTP, ya sea GET o POST, que se va a usar para procesar el formulario.

htmlAttributes
Object

que Object contiene los atributos HTML del elemento . Como alternativa, una IDictionary<TKey,TValue> instancia de que contiene los atributos HTML.

Devoluciones

Una TagBuilder instancia del <elemento /form> .

Se aplica a