I'm wondering how is it possible to add a CSS Class to the current page in your navigation when using ASP.NET MVC 3? Here is my navigation in my _Layout.cshtml file:
<p>@Html.ActionLink("Product Search", "Index", new { controller = "Home" }, new { @class = "current" })
| @Html.ActionLink("Orders", "Index", new { controller = "Orders" })
| @Html.ActionLink("My Account", "MyAccount", new { controller = "Account" })
| @Html.ActionLink("Logout", "LogOff", new { controller = "Account" })</p>
As you can see I have 4 links in my navigation with the first one having the CSS class "current" applied to it, I'd like to be able to add/remove this class to the different links in my navigation depending on which page the user is at. Is this possible?
Cheers