I am having an issue with html.actionlink. I have two routes defined:
routes.MapRoute(
"AdminDefault",
"Admin/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Page", action = "Details", id = "0" }
);
the actionlink is using the AdminDefault, when I want it to use the default controller. How do I get it to use default route without using a routelink?
To add more info. I have a simple action (home/index), it shows a view (index.cshtml), in that view I have:
@Html.ActionLink("About", "About", "Home")
Which generates a url of "/Admin/Home/About" when I want it to be "/Home/About" the defaultadmin route is so that i can create links later that go to /admin/controller/action for any administration pages, but I want the default generated urls to not be under admin.