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

Switch View :
ScriptFree
.NET Framework Class Library
LinkExtensions.ActionLink 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 ActionLink(HtmlHelper, String, String) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(HtmlHelper, String, String, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(HtmlHelper, String, String, String) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(HtmlHelper, String, String, RouteValueDictionary) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(HtmlHelper, String, String, Object, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(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 ActionLink(HtmlHelper, String, String, String, Object, Object) Returns an anchor element (a element) that contains the virtual path of the specified action.
Public method Static member ActionLink(HtmlHelper, String, 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 ActionLink(HtmlHelper, String, 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 ActionLink(HtmlHelper, String, 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 ActionLink method renders an element that links to an action method.

See Also

Reference

Community Content

LukePuplett
An alternative approach
The logic involved in building a link is placed in the View, whereas I believe that it should be in with the thing it's linking-to, the action, or at least its controller.

In this blog post, I show how I created my own link builder method and how it helps me refactor my code more easily (and without having to scan through all my aspx pages looking for dodgy routeValues).

http://www.lukepuplett.com/2010/09/aspnet-mvc-robust-hyperlinks.html