title: asp.net adding class to current menuItem
body: <p>I am new the asp.net so i will appreciate a full code answer.    </p>
  
  <p>I have a web site in asp.net and c# i added  a menu to the site.master page it looks like this:    </p>
  
  <pre><code>&lt;asp:Menu ID="mainMenu" runat="server" autopostback="true"&gt;
              &lt;Items&gt;
                  &lt;asp:MenuItem Text="Home" Value="Home" &gt;&lt;/asp:MenuItem&gt;
                  &lt;asp:MenuItem Text="Pipes" Value="Pipes"&gt;&lt;/asp:MenuItem&gt;
                  &lt;asp:MenuItem Text="View &amp;amp; Query" Value="View &amp;amp; Query"&gt;&lt;/asp:MenuItem&gt;
                  &lt;asp:MenuItem Text="API" Value="API"&gt;&lt;/asp:MenuItem&gt;
              &lt;/Items&gt;
          &lt;/asp:Menu&gt;
  </code></pre>
  
  <p>I now need to add that when the user is on a specific page for example Pipes, then the right menuItem should have a different background color.</p>
  
  <p>i can use a session  variable but i am not sure how to do that.    </p>
  
  <p>Can any one please write for me a full example for this?   </p>
  
  <p>Thank you in advance</p>