save control state and display it after postback

Discussion in 'ASP .Net Building Controls' started by Uri, Aug 30, 2003.

  1. Uri

    Uri Guest

    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 ?
    Uri, Aug 30, 2003
    1. Advertisements

  2. Uri

    Memi Lavi Guest

    How do you create those listboxes? Do you add them in the
    CreateChildControls method?
    Memi Lavi, Aug 30, 2003
    1. Advertisements

  3. Uri

    junk qwe Guest

    yes i use the CreateChildControls method to
    add all the elements in the control
    junk qwe, Aug 30, 2003
  4. Uri

    Teemu Keiski Guest

    Teemu Keiski, Aug 31, 2003
  5. but when returning from the sever the lists items are gone.
    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?
    Jimmy [Used-Disks], Sep 4, 2003
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.