Is there a way in a view in ASP.Net MVC to get the names of the controller and actien method that are using the view?
Try this:
<%= ViewContext.RouteData.Values["Controller"] %> <%= ViewContext.RouteData.Values["Action"] %>
1.4m articles
1.4m replys
5 comments
57.0k users