DefaultHtmlGenerator.GenerateForm Metodo

Definizione

Generare un <elemento del modulo> . Quando l'utente invia il modulo, l'azione con nome actionName elabora la richiesta.

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

Parametri

viewContext
ViewContext

ViewContext Istanza dell'ambito corrente.

actionName
String

Nome del metodo di azione.

controllerName
String

Nome del controller.

routeValues
Object

Oggetto Object contenente i parametri per una route. I parametri vengono recuperati tramite reflection esaminando le proprietà di Object. Viene Object in genere creato usando Object la sintassi dell'inizializzatore. In alternativa, un'istanza IDictionary<TKey,TValue> contenente i parametri di route.

method
String

Metodo HTTP per l'elaborazione del form, ovvero GET o POST.

htmlAttributes
Object

Oggetto Object contenente gli attributi HTML per l'elemento . In alternativa, un'istanza IDictionary<TKey,TValue> contenente gli attributi HTML.

Restituisce

TagBuilder Istanza dell'elemento </form>.

Implementazioni

Si applica a