Condividi tramite


HtmlHelper.RouteLink Metodo

Definizione

Restituisce un elemento ancoraggio (<a>) che contiene un percorso URL per la route specificata.

public:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(System::String ^ linkText, System::String ^ routeName, System::String ^ protocol, System::String ^ hostName, System::String ^ fragment, System::Object ^ routeValues, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent RouteLink (string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes);
abstract member RouteLink : string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.RouteLink : string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function RouteLink (linkText As String, routeName As String, protocol As String, hostName As String, fragment As String, routeValues As Object, htmlAttributes As Object) As IHtmlContent

Parametri

linkText
String

Testo interno dell'elemento ancoraggio. Non deve essere null.

routeName
String

Nome della route.

protocol
String

Protocollo per l'URL, ad esempio "http" o "https".

hostName
String

Nome host per l'URL.

fragment
String

Nome del frammento URL (nome dell'ancoraggio).

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

Nuovo contenente l'elemento di ancoraggio IHtmlContent .

Implementazioni

Si applica a