Marking HTML-elements active based on the current route using ASP.NET MVC Tag Helpers
Adding class="active" is a fairly common practice for highlighting HTML-elements. Usually you want to let a specific list item stand out of your main navigation, indicating the section the user is currently visiting. In this post I'll explain how I implemented this behavior dynamically with ASP.NET Core MVC using Tag-Helpers. [...]