LinkExtensions Class
Represents support for HTML links in an application.
Namespace: System.Web.Mvc.Html
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | ActionLink(HtmlHelper, String, String) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, String) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, RouteValueDictionary) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, Object, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, String, Object, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | ActionLink(HtmlHelper, String, String, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | 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. |
![]() ![]() | ActionLink(HtmlHelper, String, String, String, String, String, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, RouteValueDictionary) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, Object, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, RouteValueDictionary) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, Object, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, String, String, String, Object, Object) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
![]() ![]() | RouteLink(HtmlHelper, String, String, String, String, String, RouteValueDictionary, IDictionary(Of String, Object)) | Returns an anchor element (a element) that contains the virtual path of the specified action. |
The LinkExtensions class contains methods that extend the HtmlHelper class. Each extension method renders an HTML anchor element (a element). The ActionLink method renders an element that links to an action method. The RouteLink method renders an element that links to a URL based on a route. The URL can resolve to an action method, a file, a folder, or some other resource.
The following example shows how to create HTML links using the ActionLink and RouteLink methods. The view contains a link to an action method and a link to a text file. The link to the text file uses a named route that is defined in the Global.asax file.
The following example shows the route definition that was added to the RegisterRoutes subroutine in the Global.asax file.
.gif?cs-save-lang=1&cs-lang=vb)
.gif?cs-save-lang=1&cs-lang=vb)