HtmlHelper.BeginRouteForm Metodo

Definizione

Esegue il rendering di un <tag di avvio del modulo> alla risposta. La route con nome routeName genera il <valore dell'attributo del action modulo>.

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::MvcForm ^ BeginRouteForm(System::String ^ routeName, System::Object ^ routeValues, Microsoft::AspNetCore::Mvc::Rendering::FormMethod method, Nullable<bool> antiforgery, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm (string routeName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes);
abstract member BeginRouteForm : string * obj * Microsoft.AspNetCore.Mvc.Rendering.FormMethod * Nullable<bool> * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
override this.BeginRouteForm : string * obj * Microsoft.AspNetCore.Mvc.Rendering.FormMethod * Nullable<bool> * obj -> Microsoft.AspNetCore.Mvc.Rendering.MvcForm
Public Function BeginRouteForm (routeName As String, routeValues As Object, method As FormMethod, antiforgery As Nullable(Of Boolean), htmlAttributes As Object) As MvcForm

Parametri

routeName
String

Nome della route.

routeValues
Object

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

method
FormMethod

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

antiforgery
Nullable<Boolean>

Se true, gli <elementi del modulo> includono un token antiforgery. Se false, elimina la generazione di un <input> di tipo "nascosto" con un token antiforgery. Se null, gli <elementi del modulo> includono un token antiforgery solo se method non Getè .

htmlAttributes
Object

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

Restituisce

MvcForm Istanza che esegue il rendering del tag di fine /form> durante l'eliminazione<.

Implementazioni

Si applica a