How to enumerate Areas in ASP.NET MVC 2 RC
-
23-09-2019 - |
Question
My controller has to enumerate all the areas in the application. Is it possible? And how?
Solution
From this issue, something like that =>
RouteTable.Routes.OfType<Route>()
.Where(r => r.DataTokens != null)
.Select(r => (string) r.DataTokens["area"]);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow