开发者

Dynamically select Area in ASP.NET MVC 3 application

开发者 https://www.devze.com 2023-03-25 03:31 出处:网络
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 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

0

精彩评论

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

关注公众号