Getting the name of the controller and action method in the view in ASP.Net MVC December 14, 2023 by Tarik Try this: <%= ViewContext.RouteData.Values["Controller"] %> <%= ViewContext.RouteData.Values["Action"] %>