Getting route data in ASP.NET Razor

When developing a web app using ASP.NET MVC you sometimes come across to make decisions based on the current page. A good example of this is when you’re using Bootstrap and you want to add “active” classes to certain menu elements. You can find out where you are using the RouteData dictionary object. This contains the current area, action, controller among others. Continue reading “Getting route data in ASP.NET Razor”