I have this in my MasterPage, to get this information, to display certain things on the screen, it can help with the information you need (maybe not the most elegant solution)
public string ControllerActionName
{
get
{
return String.Concat(ViewContext.RouteData.Values["Controller"], ViewContext.RouteData.Values["Action"]).ToLower();
}
}
source
share