Incorporating a MasterPage into my website structure, I've added various tabs in the header section of the MasterPage using the following C# code:
<ul id="tabMenu">
<li><asp:HyperLink ID="homeLink" runat="server" onclick="homeButton_Click()"
NavigateUrl="~/Default.aspx">Home</asp:HyperLink></li>
</ul>
Each tab follows a similar structure to the example provided. Clicking on the 'Home' tab triggers the homeButton_Click() method in the code behind, which attempts to change the CSS class to 'activeTab':
protected void Button1_Click(object sender, EventArgs e)
{
homeLink.CssClass.Insert(0, "activeTab");
}
Despite the intended change in the CSS class, particularly altering the background-image, the current behavior is not reflecting this modification. The tab's color remains the same after clicking.
If you have any insights or suggestions on what could be causing this issue, please share.