Click here to Skip to main content
15,793,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the requirement of using the radio buttons inside the data list control.
but it is not working as there are multiple selections.
how to use it so that there is only single selection?
[no name] 9-Apr-12 14:03pm    
How are you using it? Show a little of the code/markup
Chandan Aryan 9-Apr-12 14:08pm    
<asp:DataList ID="dlShift" runat="server" RepeatColumns="3">
<table cellpadding="0" cellspacing="0">
<asp:RadioButton ID="rbShift" runat="server" GroupName="Shift" />
<td style="width: 100px;">
<asp:Label ID="lblShiftName" runat="server" Text='<%#Eval("ShiftName")%>'>
<asp:Label ID="lblPrefix" runat="server" Text="Rs.">
<td style="width: 150px;">
<asp:TextBox ID="txtCharges" runat="server" Width="100px" Text='<%#Eval("Charges") %>'>

<asp:DataList ID="DataList1" runat="server" DataKeyField="NationalityID"
            DataSourceID="SqlDataSource1" onitemdatabound="DataList1_ItemDataBound">
                <asp:Label ID="NationalityLabel" runat="server"
                    Text='<%# Eval("Nationality") %>' />
                <br />
                <br />
                <asp:RadioButton ID="RadioButton1" runat="server"/>

Check this link :
Share this answer
Chandan Aryan 10-Apr-12 4:50am    
Thanx for the solution!! its working fine nw.
Angel1320 10-Apr-12 8:17am    
You Most WelCome
check this
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900