0
去过新MVC 2,我们怎样才能得到一个链接为:如何更改ActionLink行为?
http://localhost:13269/Terms
代替
http://localhost:13269/Frontend/Terms
,因为这是结果:
<%: Html.ActionLink("Terms & Conditions", "Terms", "Frontpage")%>
即使我不t指定Controller
类似<%: Html.ActionLink("Terms & Conditions", "Terms")%>
因为我改变了到
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Frontend", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);