Composite Control Problem - ListBox

M

Mike Dando

Hi,

I have created a composite control which has some drop down lists, buttons
and a list box. The button clicks add items from the drop down lists to the
list box, but the list box only ever shows with 1 (the latest) value.
From what I have read, a ListBox does not store viewstate with regards to
items added to it.

So how can I maintain the list of items in my ListBox between trips to the
server? As this is a composite
control I would expect any solution to be within my new control's class and
not at the page level.

I have looked at the LoadViewState/SaveViewState methods but they don't seem
to get called.

Thanks,

Mike.

..NET 2003 C#
 
M

Mike Dando

If I put the same controls and code in a WebUserControl, the ListBox items
do appear
to maintan state.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top