result
<a class="nav-link active" href="/home/tech?Length=2">Text</a>
Obviously it should return the same controller and action.
But it's returning something else.
It seems that it is because string.concat is used when applying css class.
is this a bug right?
Should I write another solution to apply "bootstrap navbar active" class?
code @Html.ActionLink("TextFFF", "tech", "section") result
<a href="/section/tech">TextFFF</a>
code @Html.ActionLink("Text", "tech", "section", new { @class = string.Concat("nav-link", ViewContext.RouteData.Values["Action"].ToString() == "Index" ? " active" : "") })result
<a class="nav-link active" href="/home/tech?Length=2">Text</a>
Obviously it should return the same controller and action. But it's returning something else. It seems that it is because string.concat is used when applying css class. is this a bug right? Should I write another solution to apply "bootstrap navbar active" class?