Skip to content
Advertisement

How to keep DropDownList1 selected value after postback?

I have two DropDownLists. Once a DropDownList1 value is selected, DropDownList2 will populate based on Dropdownlist1.

But after the page refreshes, the dropdownlist1 selected value is changed to the top-most value (the DropDownList is populate by a database).

.aspx:

.cs:

Advertisement

Answer

You can use SESSION value for this purpose, using this value you need to find Item from dropdown

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement