RadioButton in DataList

D

David Lozzi

Howdy,

Using ASP.NET 2.0 with VB. I have a datalist that is listing out options.
Ecah option has a radio button for which the user has to select only one
option from the list. It displays properly but it appears to be not working
properly. They can select all of the radiobuttons at once. Not very good!
How do I set it up so each radiobutton is part of the group? I'm using the
GroupName option but no luck. See my HTML below.

Thanks

David


<asp:DataList ID="dlOptions" runat="server">
<ItemTemplate>
<td>
<asp:RadioButton ID="radOption" Text='<%#Eval("Cost") %>'
runat="server" GroupName='<%# Eval("ShipTo")%> /></td>
<td><asp:Label runat="server" ID="lblShipName"
Text='<%#Eval("Name") & "-" & Eval("Desc")%>'></asp:Label>
<asp:Label runat="server" ID="lblShipType" Text='<%#Eval("Type")
%>'></asp:Label></td>
</ItemTemplate>
<SeparatorTemplate>
<td>&nbsp;</td>
</SeparatorTemplate>
<FooterTemplate>
<td><img src="site_images/spacer.gif" width="80" height="1"
/></td>
<td><img src="site_images/spacer.gif" width="600" height="1"
/></td>
</FooterTemplate
 
D

David Lozzi

After doing some research and discovering its basically impossible, I just
lined up a RadioButtonList next to a datagrid so the options lined up and it
works great.

thanks,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top