Route("list/c-{twoCategoryID}")
Route("list/b-{brandID}")
路由这样设置
routes.MapRoute(
"list1",
"list/c-{twoCategoryID}",
new { controller = "home", action = "ProductList", twoCategoryID = UrlParameter.Optional },
new { twoCategoryID = @"[\d]{0,11}" }
);
routes.MapRoute(
"list2",
"list/b-{brandID}",
new { controller = "home", action = "ProductList", id = UrlParameter.Optional },
new { brandID = @"[\d]{0,11}" }
);
只有list/c-1有效,list/b-1无效