Dynamically select Area in ASP.NET MVC 3 application
I have a situation where I need to dynamically select the area based on some external criteria (in this case a read from my database).
I have the following standard structure in my MVC project:
- Areas
- Area1
- Area2
- Controllers
- Views
Now I want that when my users visit http://mysite.com/private
they are will either be served with Area1
or Area2
, and I want to make that decision at runtime.
I g开发者_如何学Cuess I will have to inherit from Route
or RouteBase
and do my magic there, but I'm failing to understand how to do it.
Anyone have any ideas on how to get this to work?
Thanks
精彩评论