marcus
marcus

Reputation: 10086

ASP.NET MVC 2 Areas and route priority

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.

Upvotes: 3

Views: 1837

Answers (1)

smdrager
smdrager

Reputation: 7417

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.

Upvotes: 1

Related Questions