title: Adding active menu item class to link ASP
body: <p>I have a pretty basic list of menu items on my asp web page. Currently I am trying to figure out how I could apply a class to the menu item that the user is currently on.</p>
  
  <p>For instance in html it would be something along these lines:</p>
  
  <p><code>&lt;li class = "active"&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;</code></p>
  
  <p>My ASP menu is shown below:</p>
  
  <pre><code> &lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"&gt;
                      &lt;Items&gt;
                          &lt;asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/&gt;
                          &lt;asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/&gt;
                          &lt;asp:MenuItem NavigateUrl="~/Screenshots.aspx" Text="Screenshots"/&gt;
                          &lt;asp:MenuItem NavigateUrl="~/Technology.aspx" Text="Technology"/&gt;
                          &lt;asp:MenuItem NavigateUrl="~/Contact.aspx" Text="Contact"/&gt;
                      &lt;/Items&gt;
                  &lt;/asp:Menu&gt;
  </code></pre>
  
  <p>This is the CSS style I would like to apply to the current menu item based on the page the user is on</p>
  
  <pre><code>.current
  {
   background:#40AD36;
   color:#fff;   
  }
  </code></pre>
  
  <p>Any help is much appreciated.</p>
  
  <p>Based on the comments guys I've made the following changes to my menu but still no change...</p>
  
  <pre><code>  &lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal" DynamicSelectedStyle-CssClass ="current"  StaticSelectedStyle-CssClass="current" &gt;
  </code></pre>