HtmlHelper::GenerateRouteLink Method (RequestContext, RouteCollection, String, String, RouteValueDictionary, IDictionary<String, Object>)

Visual Studio 2010

Generates an HTML anchor element (a element) that links to the specified URL route.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public:
static String^ GenerateRouteLink(
	RequestContext^ requestContext, 
	RouteCollection^ routeCollection, 
	String^ linkText, 
	String^ routeName, 
	RouteValueDictionary^ routeValues, 
	IDictionary<String^, Object^>^ htmlAttributes
)

Parameters

requestContext
Type: System.Web.Routing::RequestContext
The context of the HTTP request.
routeCollection
Type: System.Web.Routing::RouteCollection
The collection of URL routes.
linkText
Type: System::String
The text caption to display for the link.
routeName
Type: System::String
The name of the route that is used to return a virtual path.
routeValues
Type: System.Web.Routing::RouteValueDictionary
An object that contains the parameters for a route.
htmlAttributes
Type: System.Collections.Generic::IDictionary<String, Object>
An object that contains the HTML attributes for the element.

Return Value

Type: System::String
An HTML element that links to the specified URL route.

Community Additions

ADD
Show: