IHtmlHelper.ActionLink Método

Definición

Devuelve un elemento delimitador (<a>) que contiene una ruta de acceso URL a la acción especificada.

public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ ActionLink(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.Html.IHtmlContent ActionLink (string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes);
abstract member ActionLink : string * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function ActionLink (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 IHtmlContent

Parámetros

linkText
String

Texto interno del elemento delimitador. No debe ser null.

actionName
String

Nombre de la acción.

controllerName
String

El nombre del controlador.

protocol
String

Protocolo de la dirección URL, como "http" o "https".

hostname
String

Nombre de host para la dirección URL.

fragment
String

Nombre del fragmento de la dirección URL (nombre del delimitador).

routeValues
Object

que Object contiene los parámetros de una ruta. Los parámetros se recuperan mediante reflexión mediante el examen de las propiedades de Object. Normalmente se Object crea mediante la Object sintaxis del inicializador. Como alternativa, una IDictionary<TKey,TValue> instancia que contiene los parámetros de ruta.

htmlAttributes
Object

que Object contiene los atributos HTML del elemento . Como alternativa, una IDictionary<TKey,TValue> instancia de que contiene los atributos HTML.

Devoluciones

Nuevo IHtmlContent que contiene el elemento delimitador.

Se aplica a