From my understanding
However I have been using MVC 3 and note that Ajax.ActionLink has many overloads which can accept just about anything Ajax.RouteLink can including RouteData, protocol, ActionName, ControllerName etc.
The same goes for Ajax.BeginForm and Ajax.BeginRouteForm
So am am missing something or are the Route versions obsolete?
The .Route versions are used to generate links based on route (name) configurations.
route configuration (ex: global.asax)
routes.MapRoute(
"faq",
"pages/faq",
new { controller = "Faq", action = "Index" }
);
usage in a view - with Html.ActionLink
@Ajax.ActionLink(linkText: "something", controller: "Faq", action: "Index")
usage in a view - with Html.RouteLink
@Ajax.RouteLink(linkText: "something", routeName: "faq")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With