HtmlHelperLinkExtensions.RouteLink HtmlHelperLinkExtensions.RouteLink HtmlHelperLinkExtensions.RouteLink Method

Definition

Overloads

RouteLink(IHtmlHelper, String, Object) RouteLink(IHtmlHelper, String, Object) RouteLink(IHtmlHelper, String, Object)

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

RouteLink(IHtmlHelper, String, String) RouteLink(IHtmlHelper, String, String) RouteLink(IHtmlHelper, String, String)

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

RouteLink(IHtmlHelper, String, Object, Object) RouteLink(IHtmlHelper, String, Object, Object) RouteLink(IHtmlHelper, String, Object, Object)

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

RouteLink(IHtmlHelper, String, String, Object) RouteLink(IHtmlHelper, String, String, Object) RouteLink(IHtmlHelper, String, String, Object)

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

RouteLink(IHtmlHelper, String, String, Object, Object) RouteLink(IHtmlHelper, String, String, Object, Object) RouteLink(IHtmlHelper, String, String, Object, Object)

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

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

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

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

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

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 route.

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

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

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

routeName
String String String

The name of the route.

Returns

A new IHtmlContent containing the anchor element.

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

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

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

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

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 route.

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

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

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

routeName
String String String

The name of the route.

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 route.

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

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

linkText
String String String

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

routeName
String String String

The name of the route.

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