I have an MVC View User Control and from with Controller I would like to find out what the name of the controller that the MVC View User Control has been called from.
Hope that makes sense?
I have an MVC View User Control and from with Controller I would like to find out what the name of the controller that the MVC View User Control has been called from.
Hope that makes sense?
This should do it :
<%=ViewContext.RouteData.Values["controller"] %>