在asp.net mvc的母版页 View 中找到 Controller 名称的更好方法是什么?
谢谢
阿楚
最佳答案
StackOverflow - Getting the name of the controller and action method in the view in ASP.NET MVC:
<%: ViewContext.RouteData.Values["Controller"] %>
<%: ViewContext.RouteData.Values["Action"] %>