I want to obsolete controller name from Html.ActionLink
because I defined my controller in route how to do this,
because if I leave controller name blank in Html.ActionLink
mvc3 automatically put current controller name in Action Link.
I want to obsolete controller name from Html.ActionLink because I defined my controller in
Share
If you named your route, you can use
RouteLinkinstead ofActionLink.You’ll only have to specify the name of the route, not the controller.
Here’s an example of a named route:
And here’s how to use it in your view
Please see MSDN for full details on RouteLink.