how to avoid page postback on dropdown selected index changed
i have bind some dynamic data on selected index changed of dropdown,but when i click on submit button on page postback,data which was bound is gone. As data is bind on selected index changed of dropdown,if(!(IsPostback)) is not working for me?
Can you pleas开发者_StackOverflow社区e tell how to solve this problem?Plz help
Thanks. Tina
The only way you can bind your dropdown control once only (i.e. only when IsPostBack is false) is to rely on the view state to maintain the list of items.
It sounds like the view state is not enabled on your drop down control (property EnableViewState). If that is not the problem, please consider posting your code here as the other commenters have requested, so the question can be useful to others.
精彩评论