Given a Controller name, and a Action name – “AdminController”, “Index” for example, is it possible for me to get back all the possible Areas.
Does that make any sense to anyone?
Cheer,
ETFairfax.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not really supported to do this. In MVC 2, controllers aren’t associated with areas. The way the implementation works is that the route is associated with a set of namespaces, and the controller factory looks only in those namespaces for a controller type to service the request. So there’s no direct mapping from a controller to an area.
If you explain a little bit more on what you’re trying to do, perhaps we can find an alternative method for getting you unstuck.