mvc路由
时间:2010-09-13 来源:二锅头
将newslist.aspx?page=* 转换成news/*
routes.MapRoute(
"news", "news/{id}",
new { Controller = "news", action = "newslist", id = 1 }, //默认id号为1
new {id=@"[\d]"} //用正则表达式使id号必须为整数
);
相关阅读 更多 +