Himanshu Tyagi

Himanshu Tyagi

  • NA
  • 119
  • 15.8k

How to apply css to a button after on click in repeater

Dec 20 2017 2:50 AM
I am using a button inside repeater. How to aplly css to clicked button and i click on another button then css should be add on the clicked button and removed from the first clicked button?
 
<asp:Repeater ID="rptrQtyVariant" runat="server" OnItemCommand="rptrQtyVariant_ItemCommand" OnItemDataBound="rptrQtyVariant_ItemDataBound">
<ItemTemplate>
<asp:Label ID="lblItemId" Visible="false" runat="server" Text='<%#Eval("ITEM_ID") %>'></asp:Label>
<asp:Label ID="lblSku" Visible="false" runat="server" Text='<%#Eval("SKU") %>'></asp:Label>
<asp:LinkButton ID="lnkQtyVariant" CssClass="product-variant__btn pdp-btn" OnClick="lnkQtyVariant_Click1" CommandName="ItemQty" runat="server">
<asp:Label ID="lblQty" runat="server" Text='<%#Eval("ITEM_QTY") %>'></asp:Label><br />
</asp:LinkButton>
</ItemTemplate>
</asp:Repeater>
 

Answers (5)