首页 新闻 会员 周边 捐助

mvc路由配置

0
悬赏园豆:5 [已解决问题] 解决于 2015-10-23 14:01

  

//产品列表
routes.MapRoute("zclist", "zc/list-{typeid}-{catid}-{product_state}-{bankid}-{orderby}-{page}.html",
new { controller = "Cr", action = "List", typeid = 0, catid = 0, product_state = 0, bankid = 0, orderby = 0, page = 1 },
new { typeid = @"\d+", catid = @"\d+", product_state = @"\d+", bankid = @"\d+", orderby = @"\d+", page = @"\d+" });

//产品列表
routes.MapRoute("zclist1", "zhongchou/list-{catid}.html",
new { controller = "Cr", action = "List", typeid = 0, catid = @"\d+", product_state = 0, bankid = 0, orderby = 0, page = 1 });

routes.MapRoute("zclist2", "zhongchou/list-{catid}-{page}.html",
new { controller = "Cr", action = "List", typeid = 0, catid = @"\d+", product_state = 0, bankid = 0, orderby = 0, page = @"\d+" });

 

 

前面的两个通过了测试,最后一个没法通过测式,提示catid不能为null,请高人指点

mvc
星星点灯6的主页 星星点灯6 | 初学一级 | 园豆:164
提问于:2015-10-19 11:27
< >
分享
最佳答案
0

把你测试的URL列举出来。。。

收获园豆:5
Jeffcky | 老鸟四级 |园豆:2789 | 2015-10-19 13:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册