Couple things
Are you checking Page.Ispostback method in your page load?
How are you adding the items to the listboxes since they are added by
references.

Signature
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
> Hi,
>
> I am having a problem with caching :-
>
> I have a page that has several drop down lists on it. The data for these lists are stored in a SQL server database. At the moment, when the page
loads, I loop through the DB table adding the items to a
System.Web.Ui.WebControls.ListItem array. This array is then added to each
list box.
> What I was hoping to do was store the System.Web.UI.WebControls.ListItem array in Cache. Initially the items get added to the Cache OK and the
listbox gets populated as it should. However, after an item from a dropdown
list has been selected and the changes posted back to the server a problem
occurs.
> Next time I load the page, the Cache has been updated so that the item I selected has its selected property set to true.
>
> I do not understand how this can happen as I do not modify the Cache after it has first been created. The only thing I can think is that a reference is
being stored in Cache not the actual value.
> Any ideas?
Darren Newton - 05 Apr 2004 14:41 GMT
Hi
1) Yes I am checking IsPostBack. However the drop down lists I am adding are in a placeholder as they are dynamically generated
2) I am adding items using the listbox.Items.AddRange method.