How do you access the current RouteData from View in .net MVC?

If I want to directly access RouteData (the current action or parameter values, for example) from View , instead of passing it from the controller as part of ViewData , which class am I using?

+45
asp.net-mvc
Jul 16 '09 at 0:13
source share
1 answer
 this.ViewContext.RouteData 

gotta do the trick.

+80
Jul 16 '09 at 0:32
source share
— -



All Articles