Hi Is there a way to retrieve the current routing action from a MVC request?
Cheers,
raj
Hi Is there a way to retrieve the current routing action from a MVC request?
Cheers,
raj
In general, all route values are stored in RouteData. If you want to know it in a view, you use:
<%= Html.ViewContext.RouteData.Values["action"] %>
If you are in a controller, you use:
string action = RouteData.Values["action"];
Am I answering your question?