I have an ASP.NET MVC3 application in which I am creating multiple areas, is there a way I can find out programmatically the number of areas that are present and their names.
What I want to do it create some partial pages in the different areas and in the main application create a page that will render the partial pages.
I have an ASP.NET MVC3 application in which I am creating multiple areas, is
Share
No AFAIK currently there isn’t an easy and reliable way to do this. In ASP.NET MVC 4.0 though there will be, I promise 🙂
Currently you might need to use reflection and look at all namespaces containing
Areas.somethingand count them. Not very reliable.