I tried to add class in tag
<ul>
<li><asp:Linkbutton runat="server" Text="Text1"/></li>
<li class="active"><asp:Linkbutton runat="server" Text="Text2"/></li>
and this is my JQuery Code
<script>
$(document).ready(function () {
$("li").click(function () {
$("li").removeClass();
$(this).addClass("active");
});
});
</script>
Nothing that isn't runat="server" can be persisted; you need to store information about selected element (somewhere) - either utilize which link was clicked or store id of last clicked element into hidden field:
Note: the "li" elements have to have unique id assigned in this case.
In Code File