Consider i have 3 linkbuttons on a page,
<asp:LinkButton ID="LB1" runat="server" CssClass="regular" OnClick="LB1_Click">
Today
</asp:LinkButton>
<asp:LinkButton ID="LB2" runat="server" CssClass="regular" OnClick="LB2_Click">
Today
</asp:LinkButton>
<asp:LinkButton ID="LB3" runat="server" CssClass="regular" OnClick="LB3_Click">
Today
</asp:LinkButton>
I want to highlight a linkbutton on its click with a css and then remove its css when another linkbutton is clicked (ie) i want to show active link button. Any suggestion.
In Page_Load, you set the css class of all the linkbuttons to default class
And in the Btn_Click event of each LinkButton, you set its css class to the “Active” css
Eg : If LB1 is clicked then within LB1_Click
This seems straight forward enough.
Hope i am not mis-understanding something in your question.