In my page , i have 2 dropdowns . i am populating them through javascript and accessing them on button click. but the values of the dropdowns getting empty. can u suggest any solution?
Dropdownlist items get empty on postback
Collapse
X
-
Tags: None
-
You need to remember what your DropDownLists were populated with between server request/responses. You can use hidden fields if you just need to maintain the values between server requests for a particular page...or if you need to remember this between pages you could use cookies.
Once you have the information about what the DropDownLists were populated with you can repopulate them on page load (or ajax return).
-Frinny
Comment