我的路线注册如下:
routes.MapRoute(
"course_list",
"course/list",
new { controller = "course", action = "list" }
);
routes.MapRoute(
"course_view",
"course/view/{id}",
new { controller = "course", action = "view", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
我可以浏览到 /course/view/87 并匹配正确的路线。当我访问 /course/list 页面并单击该页面上指向 /course/view/87 的链接时,我得到一个 404: /course/list not found。任何想法?
谢谢