How To Get Client Added Controls back to Server

M

MS News

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
 
W

William F. Robertson, Jr.

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
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top