如何在某个action方法中获取它所在的控制器和action名称呢。
string controllerName = Request.RequestContext.RouteData.Values["controller"].ToString();//获取控制器名 string actionName = Request.RequestContext.RouteData.Values["action"].ToString();//获取action名
MVC 在action方法中获取当前action的控制器名和action名
原文:http://www.cnblogs.com/senyier/p/7609297.html