Dynamically set selected item of RadioButtonList

G

Groove

I've searched numerous threads and posts and can't seem to find a fitting
answer. Hopefully this is simple - it seems very simple.

I'm trying to set a SelectedValue of a RadioButtonList to a value from a db
record upon page load. Yet, when the page loads, the RBL has nothing
selected.

Any ideas? The value from the record is definitely a 0 or a 1.

....in page_load ..

radAccommodated.SelectedValue = drData1("AllAccommodated")



...on page...

<asp:RadioButtonList ID="radAccommodated" runat="server" CellPadding="3"
CellSpacing="0" Width="90%">

<asp:ListItem Value="1">Yes, all requests accommodated.</asp:ListItem>

<asp:ListItem Value="0">No, all are not accommodated. .</asp:ListItem>

</asp:RadioButtonList>



Thanks!
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top