I have a small MVC site that uses the Html.ActionLink helper for a navbar. One thing I would like to change is that the default ActionLink will render out an html link to a page even if that is the current page.
For example, it creates a link like this:
<a href="/myUrl">Some title...</a>
even if you're already on /myUrl. It would be nice if it would disable that link and maybe insert a special CSS class to show the currently visited page, like this:
<a href="#" class="currentPageCSS">My Url</a>
<a href="/someOtherUrl">Some Other Url</a>
This problem must have been encountered before on loads of MVC sites, so I'm curious to know how other people have tackled it.