title: ASP.net MVC - Navigation and highlighting the "current" link
body: <p>When you create a new MVC project it creates a Site.master with the following markup:</p>
  
  <pre><code>&lt;div id="menucontainer"&gt;
      &lt;ul id="menu"&gt;
          &lt;li&gt;&lt;%: Html.ActionLink("Home", "Index", "Home")%&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%: Html.ActionLink("About", "About", "Home")%&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would like to put code in here that will highlight the current link if I am on that page. </p>
  
  <p>If I add another link such as:</p>
  
  <pre><code>&lt;li&gt;&lt;%: Html.ActionLink("Products", "Index", "Products")%&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I would want the Products link to be active (using a css class like .active) if I'm on any action in the Products controller.</p>
  
  <p>The About link should be active if I'm on the HomeController About action. The Home link should be active if I'm on the Index action of the HomeController.</p>
  
  <p>What is the best way to do this in MVC?</p>