save control state and display it after postback

U

Uri

Hi,
i built a control which contains two listbox controls and two buttons which
uses to transfer elements from one listbox to the other and back.
i used the buttons click events to transfer the selected item from one list
to the other
but when returning from the sever the lists items are gone.
how do i save the items through postback ?
 
M

Memi Lavi

Uri said:
Hi,
i built a control which contains two listbox controls and two buttons which
uses to transfer elements from one listbox to the other and back.
i used the buttons click events to transfer the selected item from one list
to the other
but when returning from the sever the lists items are gone.
how do i save the items through postback ?

How do you create those listboxes? Do you add them in the
CreateChildControls method?
 
J

Jimmy [Used-Disks]

but when returning from the sever the lists items are gone.
how do i save the items through postback ?

They should save automatically if EnableViewState is true... you may be
overrwriting them when you do the transfer. When/where are you transferring
the items? Also, could you post the code you use to do the transfer?
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top