IHtmlGenerator.GenerateActionLink Metoda

Definice

<> Vygenerujte prvek pro odkaz na akci.

public:
 Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateActionLink(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ linkText, System::String ^ actionName, System::String ^ controllerName, System::String ^ protocol, System::String ^ hostname, System::String ^ fragment, System::Object ^ routeValues, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateActionLink (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes);
abstract member GenerateActionLink : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Function GenerateActionLink (viewContext As ViewContext, linkText As String, actionName As String, controllerName 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.

actionName
String

Název metody akce.

controllerName
String

Název kontroleru.

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 pro trasu. Parametry jsou načteny reflexí prozkoumáním vlastností Object. Obvykle se Object vytváří pomocí Object syntaxe inicializátoru. Alternativně instance IDictionary<TKey,TValue> obsahující parametry trasy.

htmlAttributes
Object

Atribut Object HTML elementu. Alternativně instance IDictionary<TKey,TValue> obsahující atributy HTML.

Návraty

TagBuilder

Instance TagBuilder elementu<>.

Platí pro