Dynamically set selected item of RadioButtonList



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

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>




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