tags:

views:

286

answers:

1

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?

+17  A: 

Try this:

<%= ViewContext.RouteData.Values["Controller"] %>
<%= ViewContext.RouteData.Values["Action"] %>
eu-ge-ne