ASP.NET MVC 2 Areas and Priority Routes

Is it possible to set the route priority in asp.net mvc 2 using arearegistration? I have the whole path {* pagePath} to which I want to set the lowest priority.

+3
source share
1 answer

Yes, you can, however, this is only useful for sending things back to the stack (which is a good idea for your trick).

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

I use this in my project using routes, and it moves it to the end of the list.

+1
source

Source: https://habr.com/ru/post/1729144/


All Articles