开发者

How to enumerate Areas in ASP.NET MVC 2 RC

开发者 https://www.devze.com 2022-12-18 16:15 出处:网络
My controller has to enumerate all the areas in the application. Is it possible? 开发者_如何学PythonAnd how?From this issue, something like that =>

My controller has to enumerate all the areas in the application. Is it possible? 开发者_如何学PythonAnd how?


From this issue, something like that =>

RouteTable.Routes.OfType<Route>()
            .Where(r => r.DataTokens != null)
            .Select(r => (string) r.DataTokens["area"]);
0

精彩评论

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

关注公众号