473,396 Members | 1,884 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,396 software developers and data experts.

Updating list from client-side script

Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev
Nov 19 '05 #1
4 1189
You need to pass the data to the server and add the item to the ListControl
on the server side. This can be done using JavaScript and hidden form
fields.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev

Nov 19 '05 #2
Well, the scenario is that the user has an empty ListControl with a popup
button the right, they click the button, a modal popup list is then
presented, the user selects their item(s) and then the javascript plonks the
value(s) into the listbox.

From what you're saying I can't really do it that way AND have it posting
the items back?

Kev

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ey**************@TK2MSFTNGP09.phx.gbl...
You need to pass the data to the server and add the item to the
ListControl on the server side. This can be done using JavaScript and
hidden form fields.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev


Nov 19 '05 #3
Course you can.

You put the hidden field on the base form and pass the values to and from
the popup. I agree this is crap, but for some weird reason it does not even
add this to the list of controls/values posted back to the server. I think I
am going to post a seperate question on jsut that actually.


"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Well, the scenario is that the user has an empty ListControl with a popup
button the right, they click the button, a modal popup list is then
presented, the user selects their item(s) and then the javascript plonks
the value(s) into the listbox.

From what you're saying I can't really do it that way AND have it posting
the items back?

Kev

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ey**************@TK2MSFTNGP09.phx.gbl...
You need to pass the data to the server and add the item to the
ListControl on the server side. This can be done using JavaScript and
hidden form fields.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
I'd rather be a hammer than a nail.

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dh**********@newsfeed.th.ifl.net...
Hi all

I have a ListControland it is updated by client-side script, the client
script adds a new item and gives it a value and a key.

The problem is when it's posted back the server the items that have been
added are all blank - the text and value properties are "".

Any ideas?

Thanks
Kev



Nov 19 '05 #4

"Mr Newbie" <he**@now.com> wrote in message
news:Or*************@TK2MSFTNGP12.phx.gbl...
Course you can.

You put the hidden field on the base form and pass the values to and from
the popup. I agree this is crap, but for some weird reason it does not
even add this to the list of controls/values posted back to the server. I
think I am going to post a seperate question on jsut that actually.


Yeah that is what I've ended up doing, seems silly to allow you to populate
lists and not have the content posted back, I understand why it cannot be
done but it still sucks.

Kev
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jaime Wyant | last post by:
*long post alert!* Can anyone give me some pointers on writing "self-updating" python programs? I have an application that is almost ready for beta testing. I want to be able to fix any bugs...
3
by: CJM | last post by:
Not sure if this is entirely on-topic.... I would ideally like to present an initial list based on one DB table. The user selects an item, and the 2nd list is updated to show items from the DB...
15
by: Colin | last post by:
I have a query that calculates the selling price of products on customer orders. Selling prices are calculated based on the average cost of the items when purchased. As I make new purchases, the...
9
by: Jervin Justin | last post by:
Hi, I've been having this problem for some time with Web Forms: I have a web app that sends data to a service when the user presses a button. Based on the data, the server will send several...
2
by: Steve Wark | last post by:
Whats the easiest way to update data being displayed in a datagrid from SQL every 2-3 minutes. For instance, a user brings up a web page page that is monitoring an alarm list stored in a SQL...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
6
by: muttu2244 | last post by:
hi all am updating the same file in ftp, through multiple clients, but am scared that two clients may open the same file at a time, and try updating, then the data updated by one data will be...
3
by: Ryan Liu | last post by:
Hi, I have an Client-Server based C# application to run in an intranet. Since there are hundred of clients, what is best way to update clients? Should client use TCP/IP socket to poll new dll...
2
by: mark4asp | last post by:
Q: Initialising and updating a class with only static members & database dependency I have a class with the following members: public static List<ACISACIS_List; static AssetClass() { //...
1
by: Edwin.Madari | last post by:
by the way, iterating over bar will throw KeyError if that key does not exist in foo. to see that in action, simply set another key in bar after copy.deepcopy stmt in this example.. bar = 0 and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.