路线:
routes.MapRoute(
"Items", // Route name
"{controller}/{action}/{id}", // URL with parameters
new {controller = "Item", action = "Index", id = UrlParameter.Optional} // Parameter defaults
);
htmlhelper:
@Html.ActionLink("Chairs", "List", "Item", new {id="Chairs"}, null)
它生成的链接:
http://localhost:57899/Item/List?id=Chairs
我希望它显示的内容:
http://localhost:57899/Item/List/Chairs
怎么做?