2
Answers

check box checked value get on button click

check box inside data list and data list bind from database.
first i checked check box than select quantity from  drop_quantity and than click button submit data...
i want when click on button get value of check box and there quantity  
 
 
<asp:DataList ID="divProducts" Style="margin-top: 10px;" RepeatColumns="3" RepeatDirection="Horizontal"
runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<div runat="server" style="width: 260px; height: 305px; margin-right: 10px; margin-bottom: 5px;
border: 6px solid #e6e6e6;">
<asp:Label ID="lbl_product_id" runat="server" Visible="false" Text='<%#Eval("ProductId") %>'></asp:Label>
<img style="height: 260px; width: 260px; object-fit: cover;" src='Products/<%#Eval("Image1") %>'
alt="image1" />
<asp:CheckBox ID="chkbox" runat="server" Style="margin-top: 5px; float: left; left: 10px;
text-decoration: none !important;" AutoPostBack="true" />
<h1 style="font-size: 14px; margin-top: 2px; font-family: myriad_mmregular; font-weight: normal;">
<a style="margin-top: 5px; text-decoration: none !important;" title='<%#Eval("ProductCode") %>&nbsp;<%#Eval("ProductName") %>'>
<b>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("ProductCode") %>'></asp:Label>
</b>
<asp:Label ID="lbl_productName" runat="server" Text='<%#Eval("ProductName").ToString().Length > 20 ? Eval("ProductName").ToString().Substring(0, 20)+"..." : Eval("ProductName")%>'></asp:Label>
</a>
</h1>
<h1 style="margin-left: 150px;">
Quantity :</h1>
<span style="float: right; margin-right: 5px; margin-top: -30px;"><b class="prc"
style="font-size: 13px;">
<asp:DropDownList ID="drop_quantity" runat="server" AutoPostBack="true" Style="position: relative;
float: left; text-decoration: none !important; height: 22px; width: 40px;">
</asp:DropDownList>
</b></span>
<asp:Label ID="lbl_pro_nm" runat="server" Visible="false" Text='<%#Eval("ProName") %>'></asp:Label>
</div>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
 
 
<asp:ImageButton ID="sbmt_btn" ImageUrl="images/submit1.jpg" runat="server"
OnClick="sbmt_btn_Click1" Style="margin-left: 695px; margin-top: -32px;" />
 
Answers (2)