LinkExtensions.RouteLink Method (System.Web.Mvc.Html)

Switch View :
ScriptFree
.NET Framework Class Library
LinkExtensions.RouteLink Method

Returns an anchor element (a element) that contains the virtual path of the specified action.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method Static member RouteLink(HtmlHelper, String, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, RouteValueDictionary) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, Object, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, RouteValueDictionary) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, RouteValueDictionary, IDictionary<String, Object>) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, Object, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, RouteValueDictionary, IDictionary<String, Object>) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, String, String, String, Object, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member RouteLink(HtmlHelper, String, String, String, String, String, RouteValueDictionary, IDictionary<String, Object>) Returns an anchor element (a element) that contains the virtual path of the specified action.
Top
Remarks

The RouteLink method renders an element that links to a URL, which can resolve to an action method, a file, a folder, or some other resource.

See Also

Reference

Community Content

LukePuplett
How to Specify Controller and Action

Controller and action can be specified by sending an anonymous type into routeValues:

.RouteLink("Click to login", "RouteName", new { controller = "Account", action = "Login" })