DropDownList events not firing

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?
 
M

Madhur

Can you post some code ? Make sure that AutoPostBack property of
DropDownList is set to True.
 
W

Waldy

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.
 
D

David Wier

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
 
W

Waldy

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.
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top