Based on selection or opening of the controller action the
link will select in MVC like below.
There should you need to provide the css dynamically which
is based on the action. You need to create the CSS style.
.activelink {
color: #ffffff;
background-color: #de0301;
border-radius: 10px;
margin-left: 4px;
}
If you see the below code there we are checking the (ViewContext.RouteData.Values["Controller"].ToString()
== "Home"
