473,480 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retrieve valus modifed using AJAX

Hello,

I have a drop-down list, where by on change the value is sent to the server
(using AJAX), and a label is in turn updated on the form with the result.
This is working well, however, when I hit submit and do a traditional
post-back, the value for the label is "".

Is there something that I have to set on the label to be able to retrieve
the value on post-back?
--
Ryan
Jun 15 '06 #1
2 1074
labels are not posted back, so there is no way for the server to know it
changed. your client script could use a hidden field to tell the server it
changed the label.

-- bruce (sqlwork.com)
"Ryan" <we****@nospam.nospam> wrote in message
news:D5**********************************@microsof t.com...
Hello,

I have a drop-down list, where by on change the value is sent to the
server
(using AJAX), and a label is in turn updated on the form with the result.
This is working well, however, when I hit submit and do a traditional
post-back, the value for the label is "".

Is there something that I have to set on the label to be able to retrieve
the value on post-back?
--
Ryan

Jun 15 '06 #2
Hello Ryan,

I agree with Bruce on this. When you use client-side script to change the
Label control(actually its client-side html element)'s text, this change
does not affect the Label control's server-side state(which by default
persisted in page's ViewState area). Fortunately, since ViewState data is
serialized binary data which is not human readable, it's impossible to use
client-side script to directly modfiy it. Therefore, I also suggest you
consider Bruce's suggestion about using a hidden field to persist any
changes made on the client-side which also need to be persisted in those
certain controls' server-side state after postback.

If you have any other ideas or questions, please feel free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Jun 16 '06 #3

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

Similar topics

5
2416
by: ggk517 | last post by:
We are trying to develop an Engineering application using PHP, Javascript with Informix as the back-end. Is it possible to retrieve data using Javascript but by accessing the Database. Say...
0
2518
by: adelscott | last post by:
Hi, I'm using an autocomplete extender and I would like to retrieve the ID that goes with the label. IE: Label, ID "Mr John","CLIENT0001" "Mr Doe","CLIENT0002" etc..
1
2091
by: galdunne | last post by:
Hi, Im new to ajax and im using prototype for a project i am working on. I am hoping to call a servlet written in java which holds a hashtable to strings. When i click on a link it opens up a tab...
2
4632
by: mndprasad | last post by:
Hi friends, Am new to AJAX coding, In my program am going to have two texbox which going to implent AJAX from same table. One box is going to retrieve the value of other and vice...
0
6915
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
7097
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
6993
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
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.