What is the difference between Html.ActionLink and Html.RouteLink ?
The question arose due to the fact that I read it, saying that supposedly Html.RouteLink helps to choose a specific route from a set of routes when generating a link. However, I still do not understand how to do this, and in general Html.ActionLink and so selects the route that matches the signature. Then what is the meaning of Html.RouteLink do not understand. Tell me please.
Here is the code, why two links lead to the same controller and action if different routes are specified
routes.MapRoute( name: "D1", url: "{controller}/{action}", defaults: new { controller = "Home", action = "Index" } ); routes.MapRoute( name: "D2", url: "{controller}/{action}/{id}", defaults: new { controller = "Zurab", action = "Pavel" } ); Links
@Html.RouteLink("Click", "D2", new { id = 14 }) @Html.ActionLink("Click", "Index")