Changing Drop Down List Values

Arelryrourn

New Member
Hi, I'm building a data administration page, and I am using a main drop down list that the user will have to first select an account from. Once the user selects an account, I am able to go to the database and grab all the info I need about the account, but I do not know how to change dependent drop down lists. For example, I want to change the State drop down list. I know you can do it with the selectedindex property, but I was hoping that I could somehow use the SelectedItemValue property. Example - say the account the user clicked on is from IL, so I was hoping that after pulling IL as the state code from the database I could do something like ddlState.SelectedItem.Value = http://aspmessageboard.com/archive/index.php/"IL"....however that doesn't work...any ideas? I'd like to stay away from having to create an array with all the state codes and drop down list indexes in it...here's an example of what I've used<BR>dropDownList.SelectedIndex = dropDownList.Items.IndexOf(dropDownList.Items.Find ByValue(customerData.Rows(0)("CustomerHowManagedID")))<BR><BR>hth<BR>mattexactly what i needed, thanks<BR>
 
Back
Top