Been struggling with this for many hours. Founds lots of similar problems in forums but can't find anything that works for me.
Inside an update panel I have two dropdownlists. The first populates the second with the following code.
ddSetNames.Items.Clear()
adsNames.SelectCommand = "SELECT DISTINCT [name], [price_index] FROM [Prices] WHERE ([active] = True AND [branch_id] = " + ddBranchesE.SelectedValue.ToString + ")"
Both dropdowns are populated in Page_Load as follows;
If Not IsPostBack Then
MultiView1.EnableViewState = True
MultiView1.ActiveViewIndex = 0
adsBranches.SelectCommand = "SELECT [name], [branch_id] FROM [Branches] WHERE ([active] = True)"
adsNames.SelectCommand = "SELECT DISTINCT [name], [price_index] FROM [Prices] WHERE ([active] = True AND [branch_id] = 1)"
End If
Go to the complete details ...