DropDownList and AutoPostBack

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Hello,

I have a ddl (ddl1) which when postbacks fills
(OnSelectedIndexChanged) a second ddl. Now other second
ddl (ddl2) fills a third one (ddl3) when it postsback. The
problem is now that when the second one does a postback
then it doesnt maintain his state. Viewstate is enabled.

Any idea?
 
Hi,

Do you re-populate or clear the drop lists at all on postbacks? It's
possible the viewstate can't keep the value of the list because the
list of values is changing.

My first thing to check would be the load events and especially check
any necessary if(!Page.IsPostback) 's are in place.

Regards,

Peter Chadwick (MCP)
(e-mail address removed)
 
Hey,

I am filling the first ddl only in If Not IsPostback.
The second one is binded when the first one calls his
SelectedIndexChanged. And the third one is binded when the
second one calls his SelectedIndexChanged. So it should be
ok in "theory". I dont get this. The first one maintains
his state, but the second one doesnt. Even the third one
can maintain his state. The third one doesnt do any
postback and it doesnt call SelectedIndexChanged.
 
Back
Top