title: Programmatic solution to change navigation id to highlight current page ASP.NET
body: <p>I am writing a website with Visual Studio 2008 and ASP.NET 3.5. I have a masterpage set up to simplify the layout and to keep the content pages for content rather than content and layout.</p>
  
  <p>The navigation is list, css'd so it looks like a bar.  In order to highlight the page on the bar, the list item needs to look like this <code>&lt;li id="current"&gt;</code>.  I do not want to use <code>&lt;asp:ContentPlaceHolder&gt;</code> if I can avoid it.  Is there some code I can add to each of my pages (or just to the masterpage?) to accomplish this or am I stuck using <code>&lt;asp:ContentPlaceHolder&gt;</code>'s?</p>