Listbox not submitting correctly?

Discussion in 'ASP .Net Web Controls' started by Damien Foggon, Oct 23, 2003.

  1. I've got two listboxes on an ASPX page and use JS on the client side to move
    entries between the two lists - allowing the user to select which options
    they want and don't want.

    The problem occurs when I submit the page as the new contents of the
    listboxes (as set by the user) aren't accepted by the save click handler and
    the contents of the list boxes default to what they were when the page was
    populated.

    I did this with ASP fine (even using the same JS code at client) but is what
    I'm trying to do possible in ASP.NET?

    Ta.

    Damien
     
    Damien Foggon, Oct 23, 2003
    #1
    1. Advertising

  2. Damien,

    It is, but you'll need to use the same sorts of techniques that you used
    with ASP. For example, copy the "selected" list identifiers to a hidden
    control via client-side javascript then read the value on the server side
    from the Request.Form variables collection.

    HTH,
    Nicole


    "Damien Foggon" <> wrote in message
    news:...
    > I've got two listboxes on an ASPX page and use JS on the client side to

    move
    > entries between the two lists - allowing the user to select which options
    > they want and don't want.
    >
    > The problem occurs when I submit the page as the new contents of the
    > listboxes (as set by the user) aren't accepted by the save click handler

    and
    > the contents of the list boxes default to what they were when the page was
    > populated.
    >
    > I did this with ASP fine (even using the same JS code at client) but is

    what
    > I'm trying to do possible in ASP.NET?
    >
    > Ta.
    >
    > Damien
    >
    >
     
    Nicole Calinoiu, Oct 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Damien Foggon

    Listbox not submitting correctly?

    Damien Foggon, Oct 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    363
    Nicole Calinoiu
    Oct 23, 2003
  2. =?Utf-8?B?ZGFtb24uZg==?=

    ListBox control not being read correctly

    =?Utf-8?B?ZGFtb24uZg==?=, Jan 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    350
    =?Utf-8?B?ZGFtb24uZg==?=
    Jan 20, 2004
  3. Simon Prince
    Replies:
    2
    Views:
    3,355
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  4. thechaosengine
    Replies:
    2
    Views:
    478
  5. maas
    Replies:
    0
    Views:
    241
Loading...

Share This Page