Is it possible to set route priority in asp.net mvc 2 using arearegistration? I have a catch all {*pagePath} route which I want to set the lowest priority on.
Asked
Active
Viewed 1,824 times
3
-
http://stackoverflow.com/questions/1639971/mvc-2-arearegistration-routes-order – womp Jan 19 '10 at 22:04
-
This is indeed a duplicate, but Haacked's answer is incomplete. Please see my new response to that question: http://stackoverflow.com/questions/1639971/mvc-2-arearegistration-routes-order/2107602#2107602 – Eilon Jan 21 '10 at 07:39
1 Answers
1
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.

smdrager
- 7,327
- 6
- 39
- 49