Hi,
SelectedIndexChanged event will raise even if the AutoPostBack wouldn't be
enabled. Only thing that could prevent it from working is that you'd for
example populate the DDL every time the Page loads (not for example only at
the initial request).
And you'd need to manually save the value on previous request for example to
ViewState (say at OnPreRender stage of Page), so that you could see at
postback what it was compared to the current value. DDL itself lets you only
to the currently selected value, so it doesn't relate to the
autopostbacking.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Curt Emich" <ce****@comcast.net> wrote in message
news:CN********************@comcast.com...
Is there a better way in .NET to preserve the state of say, a dropdown list
other than using hidden fields and the like? I've noticed that the method
"SelectedIndexChanged" of a dropdown list is only called when "Autopostback"
is true. This seems to defeat the purpose altogether.
When I change the value in a dropdown listbox, I want to know what the
ORIGINAL value was so that I can PRESERVE that value when the page is
re-rendered. As it stands, I don't see any method that is fired BEFORE
postback that would allow me to store the original value of the listbox.
Do I just go back to good old fashioned javascript?