populating listbox on the server

G

Guest

I have a listbox which I am populating on the client (it contains a list of
dates selected from calender). The listbox is a server control.
When I get to the server after postback by selecting an item in the list,
the list box cannot be accessed.
How do I repopulate the listbox on the server after postback and be able to
access the elements?
 
G

Guest

what do you mean it cant be accessed? Is there an error?
Could you show the code you are using.
You should be able to loop through the Items collection on it, as long as
you aren't wiping the values with the postback prior to reading them.
 
G

Guest

When I say the list box cannot be accessed, I mean that on the server the
listbox shows that there are no items in it.
The items in the list were populated on the client side using javascript and
no server binding was done
 
I

intrader

what do you mean it cant be accessed? Is there an error?
Could you show the code you are using.
You should be able to loop through the Items collection on it, as long as
you aren't wiping the values with the postback prior to reading them.
I am interjecting here :(. However, it seems that what is happening here
is that the listbox entries are generated by the client. The server has no
idea about them.
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top