HtmlHelperLinkExtensions.ActionLink HtmlHelperLinkExtensions.ActionLink HtmlHelperLinkExtensions.ActionLink Method

Definition

Overloads

ActionLink(IHtmlHelper, String, String) ActionLink(IHtmlHelper, String, String) ActionLink(IHtmlHelper, String, String)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, Object) ActionLink(IHtmlHelper, String, String, Object) ActionLink(IHtmlHelper, String, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String) ActionLink(IHtmlHelper, String, String, String) ActionLink(IHtmlHelper, String, String, String)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, Object, Object) ActionLink(IHtmlHelper, String, String, Object, Object) ActionLink(IHtmlHelper, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String, Object) ActionLink(IHtmlHelper, String, String, String, Object) ActionLink(IHtmlHelper, String, String, String, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

ActionLink(IHtmlHelper, String, String, String, Object, Object) ActionLink(IHtmlHelper, String, String, String, Object, Object) ActionLink(IHtmlHelper, String, String, String, Object, Object)

Returns an anchor (<a>) element that contains a URL path to the specified action.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

Returns

A new IHtmlContent containing the anchor element.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, object routeValues);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String, routeValues As Object) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

Returns

A new IHtmlContent containing the anchor element.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String, controllerName As String) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

controllerName
String String String

The name of the controller.

Returns

A new IHtmlContent containing the anchor element.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, object routeValues, object htmlAttributes);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * obj * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String, routeValues As Object, htmlAttributes As Object) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

htmlAttributes
Object Object Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

A new IHtmlContent containing the anchor element.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName, object routeValues);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String, controllerName As String, routeValues As Object) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

controllerName
String String String

The name of the controller.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

Returns

A new IHtmlContent containing the anchor element.

Returns an anchor (<a>) element that contains a URL path to the specified action.

public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName, object routeValues, object htmlAttributes);
static member ActionLink : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * string * string * obj * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function ActionLink (helper As IHtmlHelper, linkText As String, actionName As String, controllerName As String, routeValues As Object, htmlAttributes As Object) As IHtmlContent

Parameters

helper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

The inner text of the anchor element. Must not be null.

actionName
String String String

The name of the action.

controllerName
String String String

The name of the controller.

routeValues
Object Object Object

An Object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the Object. This Object is typically created using Object initializer syntax. Alternatively, an IDictionary<TKey,TValue> instance containing the route parameters.

htmlAttributes
Object Object Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

A new IHtmlContent containing the anchor element.

Applies to