0
Reply

Problem with Double DropDown List.

shuchi mehta

shuchi mehta

Nov 21 2006 11:44 AM
1.9k
Hi all,

I have created a double dropdown list. Based on the first list selection, second list populates (this works fine). I have a submit button, which when clicked should run a select query based on the values selected on both the dropdown lists. But this part is not working. It picks up right value for the first dropdown list and always takes the FIRST value of the second dropdown list. I am not sure how to make it use the selected value of the second dropdown list??
Since I have to populate the second dropdown list based on the first list selection, I have kept <if(!Page.IsPostBack)> around the first dropdown list only and that makes the value of the first list stay there. 
If I keep if(!Page.IsPostBack) around both the dropdown lists, I can select the value from second dropdown list using selectedValue but the problem is: the second dropdown list always contains values based on the FIRST element of the first dropdown list.  It does not get change when I change my selection in the first dropdown list.

I have kept AUTOPOSTBACK="true" for both the dropdown lists.
Thanks.!! Please help..