Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET jQuery
I have bound Dropdown and it works perfectly; now i want to write an event while changing selected index of the dropdown. I have set autopostback property of thae dropdown True.
But while changing the index of the dropdown page loads and dropdown displays the previous value.
 
Can anyone suggest me how to solve this.
 
Thanks in advance.
Posted 10-Sep-12 0:21am
Comments
manognya kota at 10-Sep-12 5:24am
   
Where are you setting the autopost back property? i mean in server side method or client side method?
biswarup88 at 10-Sep-12 5:26am
   
in client side
Tejas_Vaishnav at 10-Sep-12 6:35am
   
place your code for dropdown binding in NOT IsPostback. then try.
i think this will cause because each and every time you post back using selected index change and it will re-bind your dropdown so your selected value will dis-appear.
Ashraff Ali Wahab at 10-Sep-12 19:47pm
   
Please post your code.Like Tejas said you might not be checking for IsPostback property and rebinding the Dropdown control without setting the selected index back.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 484
1 Peter Leow 443
2 Sergey Alexandrovich Kryukov 288
3 Kornfeld Eliyahu Peter 270
4 Maciej Los 230


Advertise | Privacy | Mobile
Web04 | 2.8.150301.1 | Last Updated 10 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100