MVC 3 Get Current Controller Name, Action, View

@HttpContext.Current.Request.RequestContext.RouteData.Values["controller"].ToString()
@HttpContext.Current.Request.RequestContext.RouteData.Values["action"].ToString()

Leave a Reply

Your email address will not be published. Required fields are marked *