How can I get the current view name regarding to current URL, in asp.net MVC 3 using Razor engine?
You can get it from RequestContext.RouteData specifically, its Values collection contains "controller" and "action" keys i.e. RequestContext.RouteData.Values["controller"] RequestContext.RouteData.Values["action"]