DropDownList and AutoPostBack

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

Peter Chadwick (MCP)

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)
 
A

Anonymous

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.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top