Setting RadioButtonList selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys

I have a radiobuttonlist with 3 listItems, with values 0, 1 and 2
respectively.

My database stores the number, but how do I set the selected on the brl to
correspond with the database.

I tried rblMyRBL.Items.FindByValue(dbfield).Selected = true;

but the selection doesn't change. Any thoughts?

Cheers


Dan
 
Dan:

Try using the SelectedValue property of the RadioButtonList.

For example:

rblMyRBL.SelectedValue = 2


--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi guys

I have a radiobuttonlist with 3 listItems, with values 0, 1 and 2
respectively.

My database stores the number, but how do I set the selected on the brl to
correspond with the database.

I tried rblMyRBL.Items.FindByValue(dbfield).Selected = true;

but the selection doesn't change. Any thoughts?

Cheers


Dan
 
Back
Top