IHtmlGenerator.GenerateRouteLink Metoda

Definice

<> Vygeneruje prvek pro propojení s akcí.

public:
 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 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
Public 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

Parametry

viewContext
ViewContext

Instance ViewContext pro aktuální obor.

linkText
String

Text, který chcete vložit do elementu.

routeName
String

Název trasy, která se má použít pro generování propojení.

protocol
String

Protokol (schéma) pro vygenerovaný odkaz.

hostName
String

Název hostitele pro vygenerovaný odkaz.

fragment
String

Fragment pro vygenerovaný odkaz.

routeValues
Object

Obsahuje Object parametry trasy. Parametry se načítají reflexí prozkoumáním vlastností .Object Obvykle se vytváří Object pomocí Object syntaxe inicializátoru. IDictionary<TKey,TValue> Případně instance obsahující parametry trasy.

htmlAttributes
Object

Atribut Object HTML elementu obsahuje. Alternativně může IDictionary<TKey,TValue> instance obsahující atributy HTML.

Návraty

TagBuilder

Instance TagBuilder elementu<>.

Platí pro