khaled ali

khaled ali

  • 1.7k
  • 47
  • 663

how to use checkbox in datalist without select btn

Jan 15 2017 5:13 PM
hi all
i need help in this Scenario for use checkbox in datalist .
if i checked any checkbox in datalist will display in label or what ever you want
on other mean if i checked directly i see result in label then if checked another the result extend in that label.
i know how to use checkbox in datalist but with buttn click or select btn .
i do not need use any btn .
 
i know this case with button click or select link . 
<table>
<tr>
<td>
<asp:DataList ID="DataList1" runat="server"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
<br />
person_no:
<asp:Label ID="personnoLabel" runat="server" Text='<%# Eval("person_no") %>' />
<br />
person_name:
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("person_name") %>' />
<br />
Country_no:
<asp:Label ID="countrynoLabel" runat="server"
Text='<%# Eval("Country_no") %>' />
<br />
<br />
</ItemTemplate>
<SelectedItemTemplate>
label
</SelectedItemTemplate>
</asp:DataList>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:mydbConn %>"
SelectCommand="SELECT top(3) * FROM [anytable]"></asp:SqlDataSource>
&nbsp;
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
</table>

Answers (1)