DropdownLIst doest not respond to changes

C

Cherry

I have a dropdown list control that load its original value even if I already choose other selection item. I have make use of selectedindexchanged event, however it does not work. pls help...thanks =)
 
F

Felbrigg

I've had this a number of times, it's always the same this with me. If the
control is set to AutoPostBack, and in the Page_Load you reload the contents
of the DropDown, this kills the selectedIndexChanged event.


Cherry said:
I have a dropdown list control that load its original value even if I
already choose other selection item. I have make use of selectedindexchanged
event, however it does not work. pls help...thanks =)
 
M

Marshal Antony

Hi Cherry,
If you have code in the Page_Load event which populates the drop down
and AutoPostBack property is set to true
for the control then the selectedindexchanged event will not give the
desired result.
The solution is to put the code in If not Post Back..
if(!IsPostBack){
populate drop down list code goes here..

}
Hope this helps.

Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com





Cherry said:
I have a dropdown list control that load its original value even if I
already choose other selection item. I have make use of selectedindexchanged
event, however it does not work. pls help...thanks =)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top