If you want the name of the controller, action or the route values in your ASP.NET MVC view, this is how.
Source: http://stackoverflow.com/questions/362514/how-can-i-return-the-current-action-in-an-asp-net-mvc-viewViewContext.Controller.ValueProvider["action"].RawValue ViewContext.Controller.ValueProvider["controller"].RawValue ViewContext.Controller.ValueProvider["id"].RawValue
No comments:
Post a Comment