I have a route as
This points to
So, how do i get the actual page path that is currently displaying as
What is the "actual page path" -- as far as everything is concerned, the route is the path.
the route points to /SomeArea/SomeController/SomeAction
Now the layout also calls some helper actions from inside the /controllers/home to build common pieces.
First, you have a very bad understanding of routing -- it does not point to a url but rather to specific classes and methods on that class. The default routing URL structure only exists because it is in the default template. You can't just "get the route" like that.
Anyhow, there are a few ways to skin this beast. The most elegant would be to sue the MVC futures and the Html.RenderAction<T> extensions, that will let you render a specific controller action in a strongly-typed manner. If you can't do that, you can pretty easily pass in the appropriate hashes for route parameters and it will find the controller.
Thanks. I will update as soon as i have some thing in place.
This topic is now archived. It is frozen and cannot be changed in any way.