Hello All,
I am struggling to find the best approach to create multiple dropdowns dynamically from database when the user selects from listbox and get the dropdown selected value and text on button click.
I have a listbox with items 1, 2 and 3. when the user selects 2, I have to create 2 dropdowns with database values and when user selects 3, it should create 3 dropdowns. I am able to create dropdowns with database source in listbox SelectedIndexChanged event.
I need to save the dropdown selected value and text into database on button click and this is where I am having issues getting the dropdownlist selected value and text.
I tried to recreate the dropdowns in page_Init but still I am getting empty string. Below is the code in button click where I am trying to retrieve dropdownlist selected value and text.
DropDownList dd = (DropDownList)container.FindControl("dlParam" + i.ToString()); --container is the pane ...
Go to the complete details ...