DefaultHtmlGenerator.GenerateRouteLink Metoda

Definicja

Wygeneruj <> element dla linku do akcji.

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

Parametry

viewContext
ViewContext

Wystąpienie ViewContext bieżącego zakresu.

linkText
String

Tekst do wstawienia wewnątrz elementu.

routeName
String

Nazwa trasy do użycia na potrzeby generowania linków.

protocol
String

Protokół (schemat) wygenerowanego linku.

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 elementu Object. Jest to Object zwykle 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

Wystąpienie TagBuilder elementu <> .

Implementuje

Dotyczy