onclick second click
<p>New to asp.net, I am having a problem on a website I am creating, I am using a master page to build my pages.  I am trying to change the css class of a li tag using the onclick event in linkbuttons: </p>

<pre><code>&lt;asp:LinkButton runat="server" id="AboutButton" OnClick="about_click" PostBackUrl="about.aspx"&gt;&lt;span&gt;About&lt;/span&gt;&lt;/asp:LinkButton&gt;
</code></pre>

<p>This linkbutton calls a function in the master page's code behind:</p>

<pre><code>protected void about_click(object sender, EventArgs e)  
{  
    if(Page.IsPostBack)  
    {       
        about.Attributes.Add`enter code here`("class", "current");  
    }  
}
</code></pre>

<p>This only works when the page is loaded and the button is clicked again. Any help would be greatly appreciated.</p>
