I used jquery to populate data to the dropdownlist and 3rd dropdownlist have a autopostback event and selected_indexchanged event.
When I select a value from 3rd dropdownlist then all dropdownist data vanished but this is not fair at all.
This is happening due to
ViewState
. When you are populating data to the
DropDownList
using
JQuery
, the
ViewState
remains same as it was during page load. And
autopostback
causes 1st and 2nd
DropDownLists
to blank as it was loaded first time.
I want that data will not be vanished from any dropdownlist and after selecting data from third dropdownlist it will go to the selected_indexchanged event and will popuate data to gridview.
Why don't you use an
UpdatePanel
and use a trigger asynchronously with
Selected_IndexChanged
event to populate the
GridView
. Hope this will help you.