Bagikan melalui


IHtmlGenerator.GenerateRouteLink Metode

Definisi

<> Buat elemen untuk tautan ke tindakan.

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

Parameter

viewContext
ViewContext

Instans ViewContext untuk cakupan saat ini.

linkText
String

Teks untuk disisipkan di dalam elemen .

routeName
String

Nama rute yang akan digunakan untuk pembuatan tautan.

protocol
String

Protokol (skema) untuk tautan yang dihasilkan.

hostName
String

Nama host untuk tautan yang dihasilkan.

fragment
String

Fragmen untuk tautan yang dihasilkan.

routeValues
Object

Object yang berisi parameter untuk rute. Parameter diambil melalui refleksi dengan memeriksa properti .Object Ini Object biasanya dibuat menggunakan Object sintaks penginisialisasi. Atau, instans yang IDictionary<TKey,TValue> berisi parameter rute.

htmlAttributes
Object

yang Object berisi atribut HTML untuk elemen . Atau, instans yang IDictionary<TKey,TValue> berisi atribut HTML.

Mengembalikan

Instans TagBuilder untuk <> elemen .

Berlaku untuk