select checkbox in datalist with out select link

Posted by Khaled2016 under ASP.NET on 1/15/2017 | Points: 10 | Views : 286 | Status : [Member] | Replies : 0
hi all

i need help in this Scenario for use checkbox in datalist .

if i checked any checkbox in datalist will display in label .

on other mean if i checked directly i see result in label then if checked another the result extend in label.

i know how to use checkbox in datalist but with buttn click or select btn .

i do not need use any btn .

exactly if i check any checkbox , the row which checked display in label then if i checked another another row extend to label

i'v did that issue with select button .


<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>





Responses

(No response found.)

Login to post response