G
Guest 20221009
Guest
I am have two Drop downs both bound to the database through SqlDataSource controls. The first DDL contains countries and the second DDL's values depend on DDL1's selected item.
The first time, everything loads fine, but on postback fired from DDL1 I get the following error:
I know I can use AppendDataBoundItems="true", but this is not ideal since I need my list to clear old items with the new stuff. Setting viewstate to false for the control does not help either.
Its driving me nuts, and the suggested solutions on the interwebs are not coming to my party.

Anybody here ever solved such a case?
The first time, everything loads fine, but on postback fired from DDL1 I get the following error:
'DDL2' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
I know I can use AppendDataBoundItems="true", but this is not ideal since I need my list to clear old items with the new stuff. Setting viewstate to false for the control does not help either.
Its driving me nuts, and the suggested solutions on the interwebs are not coming to my party.
Anybody here ever solved such a case?
Last edited by a moderator: