How To Get Client Added Controls back to Server

Discussion in 'ASP .Net' started by MS News, Jul 31, 2003.

  1. MS News

    MS News Guest

    Hello,

    Using Java Script I add some ListItem items to my ListBox ( or Options to my
    list box )
    when I post back I don't get anything at all
    What is going on
    originally the ListBox is empty then the Client will do something to
    populate it at runtime
    At the server I get nothing

    Please Help

    Thanks
     
    MS News, Jul 31, 2003
    #1
    1. Advertisements

  2. That is by design. There is no way for the ListBox control to "know" what
    was put in on the client side. Remember only the value of the listbox is
    posted back. You will have to use hidden fields to pass the new items back
    and step through them and add them to the Items collection of the ListBox on
    postback.

    bill


    "MS News" <> wrote in message
    news:uHSP2$...
    > Hello,
    >
    > Using Java Script I add some ListItem items to my ListBox ( or Options to

    my
    > list box )
    > when I post back I don't get anything at all
    > What is going on
    > originally the ListBox is empty then the Client will do something to
    > populate it at runtime
    > At the server I get nothing
    >
    > Please Help
    >
    > Thanks
    >
    >
     
    William F. Robertson, Jr., Aug 1, 2003
    #2
    1. Advertisements

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. Joby
    Replies:
    0
    Views:
    1,811
  2. Bennett Haselton
    Replies:
    1
    Views:
    725
    John M Deal
    Nov 8, 2004
  3. David Hubbard
    Replies:
    2
    Views:
    760
    David Hubbard
    Jan 17, 2006
  4. -
    Replies:
    2
    Views:
    638
    Alan Krueger
    Jul 29, 2005
  5. Michael Lang
    Replies:
    12
    Views:
    1,067
    Michael Lang
    Dec 29, 2006
  6. brieuc
    Replies:
    5
    Views:
    2,609
    Esmond Pitt
    Mar 20, 2007
  7. Wolfgang Brucker

    user controls: dynamiclly added child controls dont survive post back ?

    Wolfgang Brucker, Jan 14, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    700
    Victor Garcia Aprea [MVP]
    Jan 14, 2004
  8. ENathan

    existing controls overlaying dynamically added controls

    ENathan, Jan 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    311
    Steve C. Orr [MVP, MCSD]
    Jan 10, 2005
Loading...