views:

16

answers:

1

Been new to MVC 2, how can we get a link as:

http://localhost:13269/Terms

instead

http://localhost:13269/Frontend/Terms

as this is the result of:

<%: Html.ActionLink("Terms & Conditions", "Terms", "Frontpage")%>

even if I don't specify the Controller like <%: Html.ActionLink("Terms & Conditions", "Terms")%>

as I changed the route to

routes.MapRoute(
    "Default", // Route name
    "{controller}/{action}/{id}", // URL with parameters
    new { controller = "Frontend", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
A: 

Try this as a new route definition (declare this before the default route)

routes.MapRoute(
    "DefaultFontEnd", // Route name
    "{action}/{id}", // URL with parameters
    new { controller = "Frontend", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
Ahmad