Is it possible to get the route/virtual url associated with a controller action or on a view? I saw that Preview 4 added LinkBuilder.BuildUrlFromExpression helper, but it's not very useful if you want to use it on the master, since the controller type can be different. Any thoughts are appreciated.
C# – Asp.Net MVC: How to get virtual url for the current controller/view
asp.net-mvcc++routing
Related Question
- C# – How to create a dropdownlist from an enum in ASP.NET MVC
- C# – How to handle multiple submit buttons in ASP.NET MVC Framework
- Asp.net-mvc – How to render an ASP.NET MVC view as a string
- Asp.net-mvc – How to properly handle 404 in ASP.NET MVC
- Asp.net-mvc – How to get the current route ID within a View from the URL (ASP.NET MVC)
- C# – How to get current page URL in MVC 3
- C# – Returning a file to View/Download in ASP.NET MVC
Best Solution
I always try to implement the simplest solution that meets the project requirements. As Enstein said, "Make things as simple as possible, but not simpler." Try this.