开发者

ASP.NET MVC 2 Areas and route priority

Is it possible to set route priority in asp.net mvc 2 using a开发者_Python百科rearegistration? I have a catch all {*pagePath} route which I want to set the lowest priority on.


Yes, you can, however it is only useful for sending things to the back of the stack (which is a good idea for your catch-all).

var route = routes["home_default"];
routes.Remove(route);
routes.Add(route);

I use this on my project with routes and it moves it to the end of the list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜