IHtmlGenerator.GenerateForm Metoda

Definice

Vygenerujte <prvek formuláře> . Když uživatel odešle formulář, akce s názvem actionName žádost zpracuje.

public:
 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 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
Public Function GenerateForm (viewContext As ViewContext, actionName As String, controllerName As String, routeValues As Object, method As String, htmlAttributes As Object) As TagBuilder

Parametry

viewContext
ViewContext

Instance ViewContext pro aktuální obor.

actionName
String

Název metody akce.

controllerName
String

Název kontroleru.

routeValues
Object

Obsahuje Object parametry pro trasu. Parametry se načtou prostřednictvím reflexe prozkoumáním vlastností objektu Object. Obvykle Object se vytváří pomocí Object syntaxe inicializátoru. Případně instance obsahující IDictionary<TKey,TValue> parametry trasy.

method
String

Metoda HTTP pro zpracování formuláře, get nebo POST.

htmlAttributes
Object

Obsahuje Object atributy HTML elementu . Alternativně instance IDictionary<TKey,TValue> obsahující atributy HTML.

Návraty

Instance TagBuilder elementu </form> .

Platí pro