HtmlHelperLinkExtensions.RouteLink Method

Definition

Overloads

RouteLink(IHtmlHelper, String, Object)

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

RouteLink(IHtmlHelper, String, String)

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

RouteLink(IHtmlHelper, String, Object, Object)

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

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)

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

RouteLink(IHtmlHelper, String, Object)

Source:
HtmlHelperLinkExtensions.cs
Source:
HtmlHelperLinkExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ linkText, System::Object ^ routeValues);
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

The IHtmlHelper instance this method extends.

linkText
String

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

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

Applies to

RouteLink(IHtmlHelper, String, String)

Source:
HtmlHelperLinkExtensions.cs
Source:
HtmlHelperLinkExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ linkText, System::String ^ routeName);
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

The IHtmlHelper instance this method extends.

linkText
String

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

routeName
String

The name of the route.

Returns

A new IHtmlContent containing the anchor element.

Applies to

RouteLink(IHtmlHelper, String, Object, Object)

Source:
HtmlHelperLinkExtensions.cs
Source:
HtmlHelperLinkExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ linkText, System::Object ^ routeValues, System::Object ^ htmlAttributes);
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

The IHtmlHelper instance this method extends.

linkText
String

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

routeValues
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

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

RouteLink(IHtmlHelper, String, String, Object)

Source:
HtmlHelperLinkExtensions.cs
Source:
HtmlHelperLinkExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ linkText, System::String ^ routeName, System::Object ^ routeValues);
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

The IHtmlHelper instance this method extends.

linkText
String

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

routeName
String

The name of the route.

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

Applies to

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

Source:
HtmlHelperLinkExtensions.cs
Source:
HtmlHelperLinkExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ RouteLink(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper ^ htmlHelper, System::String ^ linkText, System::String ^ routeName, System::Object ^ routeValues, System::Object ^ htmlAttributes);
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

The IHtmlHelper instance this method extends.

linkText
String

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

routeName
String

The name of the route.

routeValues
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

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