By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

Items added to list box with client side script not present on postback

P: n/a
In an ASP.NET web application, I am using the standard list box server control and I am adding items to with client side script. When the page posts back, the added items are not available on the server.

What do I have to do to make the items available on the server after a post back

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I guess that would make sense if you think about it. Once the page is
rendered, there is no communication back to the server.

You either have to deal with the post back each time or be a bit more
creative.

How about sending a quick note to the server from javascript to fill a
database on the server side... Maybe someone else has a method of getting
the contents of the drop down on the server and then re-writing it.

My method is a bit messy, but makes for a clean user interface.... I keep
the data for the drop down in a database on the server and update the server
each time I update the drop down on the client side..

s_xml stores a small xml dataset for the one item that is added

var xml_http = new ActiveXObject("Microsoft.XMLHTTP");

var xmlSend_doc = new ActiveXObject("Microsoft.XMLDOM")
xmlSend_doc.async = false;

xmlBack_doc.async = false;
xmlSend_doc.loadXML(s_xml)

"Bill Manring" <bi**********@wavefrontsoftware.com> wrote in message
news:FF**********************************@microsof t.com...
In an ASP.NET web application, I am using the standard list box server control and I am adding items to with client side script. When the page
posts back, the added items are not available on the server.
What do I have to do to make the items available on the server after a post back?

Jul 21 '05 #2

P: n/a
I guess that would make sense if you think about it. Once the page is
rendered, there is no communication back to the server.

You either have to deal with the post back each time or be a bit more
creative.

How about sending a quick note to the server from javascript to fill a
database on the server side... Maybe someone else has a method of getting
the contents of the drop down on the server and then re-writing it.

My method is a bit messy, but makes for a clean user interface.... I keep
the data for the drop down in a database on the server and update the server
each time I update the drop down on the client side..

s_xml stores a small xml dataset for the one item that is added

var xml_http = new ActiveXObject("Microsoft.XMLHTTP");

var xmlSend_doc = new ActiveXObject("Microsoft.XMLDOM")
xmlSend_doc.async = false;

xmlBack_doc.async = false;
xmlSend_doc.loadXML(s_xml)

"Bill Manring" <bi**********@wavefrontsoftware.com> wrote in message
news:FF**********************************@microsof t.com...
In an ASP.NET web application, I am using the standard list box server control and I am adding items to with client side script. When the page
posts back, the added items are not available on the server.
What do I have to do to make the items available on the server after a post back?

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.