DefaultHtmlGenerator.GenerateRouteLink Metodo

Definizione

Generare un <> elemento per un collegamento a un'azione.

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateRouteLink(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ linkText, System::String ^ routeName, System::String ^ protocol, System::String ^ hostName, System::String ^ fragment, System::Object ^ routeValues, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteLink (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes);
abstract member GenerateRouteLink : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateRouteLink : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GenerateRouteLink (viewContext As ViewContext, linkText As String, routeName As String, protocol As String, hostName As String, fragment As String, routeValues As Object, htmlAttributes As Object) As TagBuilder

Parametri

viewContext
ViewContext

ViewContext Istanza dell'ambito corrente.

linkText
String

Testo da inserire all'interno dell'elemento.

routeName
String

Nome della route da usare per la generazione di collegamenti.

protocol
String

Protocollo (schema) per il collegamento generato.

hostName
String

Nome host per il collegamento generato.

fragment
String

Frammento per il collegamento generato.

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.

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 di <un> elemento.

Implementazioni

Si applica a