我有这两条路线。asp mvc路由问题
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional });
routes.MapRoute(
"Paging", // Route name
"{controller}/{action}/p{currentPage}",
new { controller = "Home", action = "Index" },
new { currentPage = "\\d+" });
我有这个控制器
public class MyController
{
public ActionResult All(int currentPage = 1)
{
// some code executed here
return View(pList);
}
}
为什么这个网址进入第一个路径/我的/全部/ P5
有人能指出我约航线好教程?
你能通过解释解释来帮助提问者解答吗? – 2010-11-21 12:16:50
你是什么意思?他问了一些很好的教程,我指出了一个了解路由的好地方。 – 2010-11-21 12:24:58