DropDownList events not firing

  • Thread starter Thread starter Waldy
  • Start date Start date
W

Waldy

Hi there,
I have a web form with some DropDownList controls that I am
trying to trap the selection change and run the attached server code.
However, even thought the controls have the runat property set to server,
the event code does not get executed. Anyone have any ideas?
 
Can you post some code ? Make sure that AutoPostBack property of
DropDownList is set to True.
 
Madhur said:
Can you post some code ?

Not easily as it is a large project.
Make sure that AutoPostBack property of DropDownList is set to True.

I tried that, and now the form gets posted back when a selection is made,
but the dropdown events code still does not get executed.
 
Please be more specific

The two comments you made contradict each other. When you make a selection,
the Dropdownlist OnselectedChanged event is the event that's firing, to
cause the postback.

What (exactly) are you referring to when you say "dropdown events code"

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
 
Hi David,
The two comments you made contradict each other. When you make a
selection, the Dropdownlist OnselectedChanged event is the event that's
firing, to cause the postback.

The page is re-loaded.
What (exactly) are you referring to when you say "dropdown events code"

The OnSelectedIndexChanged code in the code behind file.
 
Back
Top