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

Members online

No members online now.

Forum statistics

Threads
474,150
Messages
2,570,853
Members
47,394
Latest member
Olekdev

Latest Threads

Top