Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DropDownList and AutoPostBack

Reply
Thread Tools

DropDownList and AutoPostBack

 
 
Anonymous
Guest
Posts: n/a
 
      02-09-2005
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?
 
Reply With Quote
 
 
 
 
Peter Chadwick (MCP)
Guest
Posts: n/a
 
      02-09-2005
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)
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
 
 
 
Anonymous
Guest
Posts: n/a
 
      02-09-2005
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.


>-----Original Message-----
>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 Removed)
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asp.net DropDownList, AutoPostBack, and ViewState Corey ASP .Net 11 03-20-2005 10:44 AM
DropDownList Control and AutoPostBack problems Girish ASP .Net Web Controls 2 01-30-2004 05:00 PM
Re: DropDownlist OnSelectionChanged and AutoPostback = False S. Justin Gengo ASP .Net 0 08-15-2003 06:27 PM
Re: DropDownlist OnSelectionChanged and AutoPostback = False George Durzi ASP .Net 0 08-15-2003 03:10 PM
DropDownList and AutoPostback -- default item Null ASP .Net 1 08-05-2003 03:28 PM



Advertisments