【发布时间】:2011-11-21 20:06:18
【问题描述】:
我正在尝试创建一个路由约束,但不确定什么是最好的。这是没有限制的路线:
context.MapRoute(
"Accommodation_accomm_tags",
"accomm/{controller}/{action}/{tag}",
new { action = "Tags", controller = "AccommProperty" },
new { tag = @"" } //Here I would like to put a RegEx for not null match
);
什么是最好的解决方案?
【问题讨论】:
标签: asp.net asp.net-mvc regex asp.net-mvc-3 asp.net-mvc-routing