DefaultHtmlGenerator.GenerateForm Método

Definição

Gerar um <elemento de formulário> . Quando o usuário envia o formulário, a ação com o nome actionName processará a solicitação.

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

Parâmetros

viewContext
ViewContext

Uma ViewContext instância para o escopo atual.

actionName
String

O nome do método da ação.

controllerName
String

O nome do controlador.

routeValues
Object

Um Object que contém os parâmetros de uma rota. Os parâmetros são recuperados por meio da reflexão examinando as propriedades do Object. Normalmente Object , isso é criado usando Object a sintaxe do inicializador. Como alternativa, uma IDictionary<TKey,TValue> instância que contém os parâmetros de rota.

method
String

O método HTTP para o processamento do formulário, GET ou POST.

htmlAttributes
Object

Um Object que contém os atributos HTML para o elemento . Como alternativa, uma IDictionary<TKey,TValue> instância que contém os atributos HTML.

Retornos

Uma TagBuilder instância para o <elemento /form> .

Implementações

Aplica-se a