我已经注册了这条路线:
context.MapRoute(
"Manager",
"manage/{id}/{action}",
new { action = "index", controller = "manage", id = UrlParameter.Optional },
new string[] { "Web.Areas.Books.Controllers" }
);
然后我有这两个网址:
http://<site>/manage <-- hits the index action of managecontroller
http://<site>/manage/publish <-- ALSO HITS INDEX VIEW even I have publish action
可以缺少什么?
基本上,我需要一条路线来服务所有这些:
http://<site>/manage <-- should go to index action
http://<site>/manage/publish <-- should go to publish action
http://<site>/manage/delete <-- should go to delete action
http://<site>/manage/123123/update <-- should go to update action