Changing ListBox order with Javascript - changes lost on PostBack

Discussion in 'ASP .Net' started by Guest, Oct 1, 2004.

  1. Guest

    Guest Guest

    I have up and down buttons on my web form which execute Javascript to move
    the selected list item up or down in the list.

    However, when I post the form back to save the list order in a database, the
    original list order is still present and all changes are lost.

    Any ideas on how I can overcome this?

    James
     
    Guest, Oct 1, 2004
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    just check if you are binding the listboxes during postback.
    (ignore this msg if you are not)
    srini
     
    Guest, Oct 1, 2004
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    No, I'm not using binding.



     
    Guest, Oct 1, 2004
    #3
  4. Guest

    Guest Guest

    The order of the listbox is not posted back to the server. What I've always
    done is written the order to a hidden input and parsed that on the server.
     
    Guest, Oct 1, 2004
    #4
    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.