Is there a way to use HttpContext or the View context to get the current action name?
I can get the controller name using
var routeValues = Http
var routeValues = HttpContext.Current.Request.RequestContext.RouteData.Values; if (routeValues != null) { if (routeValues.ContainsKey("action")) { var actionName = routeValues["action"].ToString(); } }