How can we update the cssClass of a link button on each click event, considering that the page refreshes every time?
Currently, when I click on any LinkButton, the default behavior sets the cssClass to Plus LinkButton.
---index.aspx-----------
<ul class="mainMenu">
<li>
<asp:LinkButton ID="lnkHome" runat="server"><span>Home</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="lnkIndia" runat="server"><span>India</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkWorld" runat="server"><span>World</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkStates" runat="server"><span>States</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkCity" runat="server"><span>City</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkBusiness" runat="server"><span>Business</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkSport" runat="server"><span>Sport</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkMagazine" runat="server"><span>Magazine</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkBlogs" runat="server"><span>Patrika Blogs</span></asp:LinkButton></li>
<li>
<asp:LinkButton ID="lnkPlus" CssClass="active" runat="server"><span>Plus</span></asp:LinkButton></li>
CSS Classes
ul.mainMenu{float:right; background:url(../images/menubg.gif) 0 0 repeat-x; width:100%}
ul.mainMenu li{float:left; color:#a7b5be; font-weight:bold; background:url(../images/seprator.gif) right 0 no-repeat; position:relative; z-index:999}
ul.mainMenu li a{color:#586066;line-height:24px;display:inline-block;}
ul.mainMenu li a span{color:#576067; padding:0 11px; line-height:24px; display:inline-block; }
ul.mainMenu li a:hover{background:url(../images/hover.gif) 0 0 repeat-x}
ul.mainMenu li a:hover span{color:#fff}
ul.mainMenu li a.active{background:url(../images/hover.gif) 0 -24px repeat-x;}
ul.mainMenu li a.active span{background:url(../images/redArrow.gif) center bottom no-repeat; padding-bottom:7px; color:#fff}
VB CODE
Protected Sub lnkHome_Click(sender As Object, e As EventArgs) Handles lnkHome.Click
If (ConfigurationManager.AppSettings("SeoFriendlyUrl") = "true") Then
Response.RedirectToRoute("HomePage")
Else
Response.Redirect("index.aspx")
End If
End Sub
Protected Sub lnkAboutUs_Click(sender As Object, e As EventArgs) Handles lnkAboutUs.Click
...