Populate a Listbox by using JavaScript

D

Devin Wood

Hi,

I have a page with a ListBox on it, and It's also have a some buttons to
populate the ListBox by using JavaScript.
I have no problem with populate the listbox using JavaScript. But when the
page is submited / postback, the listbox is still empty.

Do you have any solution for this case (if I still want to use ListBox
Server Control) ?

thanks,
Devin Wood
 
E

Eliyahu Goldin

Devin,

You need to pass the new items to the server. It can be done in a hidden
input html control. On server side you will parse the input's value and
populate the listbox.

Eliyahu
 

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

Top