473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
2 2151
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Kay | last post by:
Hello, I have two list boxes on my form, one initially displays with items and the other displays blank, by clicking a button, it is possible to move items from one box to another and vice a...
6
by: Valerian John | last post by:
I have a ListBox webcontrol on an aspx page. Items are added to the ListBox using client-side code. However, when the page is posted back the items are missing/not available. (It is like the...
5
by: Brian Henry | last post by:
I am trying to add some items to a list box in java script, they add just fine, the values and text are how they should be. The problem though is when I try to access these added items from asp.net...
3
by: Stimp | last post by:
I have a listbox of values that I populate from a database. I want the user to be able to re-order the list (by first selecting an item and then clicking 'up' or 'down' buttons) and then save...
2
by: Bill Manring | last post by:
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...
2
by: Bart Van Hemelen | last post by:
The situation: I have a CheckBoxList cblTest, the items are disabled in cblTest_DataBound in a foreach (ListItem oItem in cblTest.Items) loop. I provide a link that calls a client-side JavaScript...
3
by: Brian Simmons | last post by:
Hi All, I search on codeproject and google but didn't find what I was looking for. Anybody know of a good implementation where you have 2 listboxes and you want to move items between the 2. ...
4
by: bogdan | last post by:
Hi, I have two listboxes on a page and need to move items between them - using buttons (e.g. "<<" ">>"). Can this be done on a client side in asp.net? I'd like to avoid hitting the server on...
7
by: yanni | last post by:
I have some thing like this: <body> <form id="form1" runat="server"> <div> <asp:DropDownList ID="uxTestDropDownList" runat="server" /> <asp:Button ID="uxSubmitButton" runat="server"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.