Link to home
Start Free TrialLog in
Avatar of Russ Suter
Russ Suter

asked on

Selecting an item in a DropDownList

OK, this should be simple enough but I can't seem to solve it. I need to programmatically set the selected item of a dropdownlist control if I know the value. I understand I can use DropDownList1.Items.FindByValue("1") to return the ListItem itself. What I need to do is make sure that is the selected item. Can anyone help?
ASKER CERTIFIED SOLUTION
Avatar of CBeach1980
CBeach1980

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi'

You have to write in the select indexchanged event like below
drpList.Items.FindByValue("1").Selected = true