I don't think that can happen. When you populate a listbox on the server,
all that stuff is stored via viewstate (which is how the listbox stays
populated after a postback). Since you can't hack the viewstate, I don't see
how you could keep the listbox populated, other then passing the items that
should go in it as a list in a hidden input or something, and manually
populating on the server.
"Ryan Taylor" <rt*****@stgeorgeconsulting.com> wrote in message
news:uO**************@TK2MSFTNGP14.phx.gbl...
Hello.
I have an application where I need the user to be able to add items to a
listbox. I've implemented this via javascript. The listbox is an
<asp:ListBox>. However, when the user submits the form those items do not
get posted. My listbox.Items.Count always returns 0.
I want the user to be able to add items without having to resort to a
postback, hence the javascript. But I need to be able to access those
items
in the code behind page as well. Any thoughts on how this is best
achieved?
Thanks in advance.
Ryan Taylor