IHtmlGenerator.GenerateRouteLink Metoda

Definicja

Wygeneruj <> element dla linku do akcji.

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

ViewContext Wystąpienie bieżącego zakresu.

linkText
String

Tekst do wstawienia wewnątrz elementu.

routeName
String

Nazwa trasy, która ma być używana do generowania linków.

protocol
String

Protokół (schemat) dla wygenerowanego łącza.

hostName
String

Nazwa hosta wygenerowanego linku.

fragment
String

Fragment wygenerowanego linku.

routeValues
Object

Element Object zawierający parametry trasy. Parametry są pobierane przez odbicie, sprawdzając właściwości obiektu Object. Zwykle jest to Object tworzone przy użyciu Object składni inicjatora. Alternatywnie IDictionary<TKey,TValue> wystąpienie zawierające parametry trasy.

htmlAttributes
Object

Element Object zawierający atrybuty HTML elementu . Alternatywnie IDictionary<TKey,TValue> wystąpienie zawierające atrybuty HTML.

Zwraca

TagBuilder Wystąpienie elementu <> .

Dotyczy