Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DropDownList events not firing

0 views
Skip to first unread message

Waldy

unread,
May 7, 2008, 6:28:54 AM5/7/08
to
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?


Madhur

unread,
May 7, 2008, 7:15:29 AM5/7/08
to
Can you post some code ? Make sure that AutoPostBack property of
DropDownList is set to True.

--
Madhur

"Waldy" <som...@microsoft.com> wrote in message
news:OYZSo0Cs...@TK2MSFTNGP02.phx.gbl...

Waldy

unread,
May 7, 2008, 9:27:54 AM5/7/08
to

"Madhur" <s...@df.com> wrote in message
news:689729EC-570C-4571...@microsoft.com...

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


David Wier

unread,
May 7, 2008, 10:21:38 AM5/7/08
to
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


"Waldy" <som...@microsoft.com> wrote in message

news:OjftqYEs...@TK2MSFTNGP02.phx.gbl...

Waldy

unread,
May 7, 2008, 12:19:59 PM5/7/08
to
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.


0 new messages