RadioButtonList with a default checked

G

GregG

I have a radiobuttonlist that is populated from a database...
My question is....is there a way to have a radio button selected a
checked by default in the list?

I tried this, which works for the selected radiobutton, but it kill
everything else.

*rbcohortList.Items.FindByText("All Students").Selected;


-
Greg
 
T

Teemu Keiski

Hi,

Try:

rbcohortList.SelectedIndex =
rbcohortList.Items.IndexOf(rbcohortList.Items.FindByText("All Students"))
 

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

Top