473,473 Members | 1,524 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

interesting ajax issue

Hi all,

I have an interesting issue that I think maybe related to AJAX. Here is my
scenario:-

I have an aspx page that contains an UpdatePanel with
UpdateMode="conditional". There exists 2 usercontrols (ascx) inside this
main UpdatePanel called UserControlA & UserControlB. Additionally, there is
also a submit button inside this main UpdatePanel called BTNSUBMIT.

Both UserControlA and UserControlB be in turn have an UpdatePanel inside
their content with the default value for UpdateMode. UserControlA has a
read-only textbox called TextBox1 and a checkbox called CheckBox1 inside its
UpdatePanel. When the user clicks on the checkbox, some client-side
javascript is invoked that changes the value of the read-only textbox. This
works fine client-side.

However, when the user clicks on BTNSUBMIT (which resides in the parent aspx
page) as postback occurs and the value sent back to the server for TextBox1
is the original value and not the new value changed by the javascript code.

Any ideas?

TIA!
Aug 1 '07 #1
1 1286
the Textbox will not load the postback value if its readonly. your code
can read it manually from the from postback values or (i haven't tested
but should work), turn viewstate off, and in oninit set readonly false.
set it back on in prerender.

-- bruce (sqlwork.com)
pa***@community.nospam wrote:
Hi all,

I have an interesting issue that I think maybe related to AJAX. Here is my
scenario:-

I have an aspx page that contains an UpdatePanel with
UpdateMode="conditional". There exists 2 usercontrols (ascx) inside this
main UpdatePanel called UserControlA & UserControlB. Additionally, there is
also a submit button inside this main UpdatePanel called BTNSUBMIT.

Both UserControlA and UserControlB be in turn have an UpdatePanel inside
their content with the default value for UpdateMode. UserControlA has a
read-only textbox called TextBox1 and a checkbox called CheckBox1 inside its
UpdatePanel. When the user clicks on the checkbox, some client-side
javascript is invoked that changes the value of the read-only textbox. This
works fine client-side.

However, when the user clicks on BTNSUBMIT (which resides in the parent aspx
page) as postback occurs and the value sent back to the server for TextBox1
is the original value and not the new value changed by the javascript code.

Any ideas?

TIA!

Aug 1 '07 #2

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

Similar topics

4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
4
by: ext237 | last post by:
Simple ajax call seems to have some issues in Firefox. The "onComplete:" is called BEFORE the response is returned by the call. Is there a coding issue or a work around? var ajax = new...
2
by: verci | last post by:
Hi guys, I'm running VS2005, AP.net 2.0, Windows XP SP2 Ok this maybe a dumb question but here it goes, as a newbie I've just finished my first AJAX enable page, everything works great but,...
7
by: =?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?= | last post by:
Hi! I know this topic has been discussed a long way, but I haven't found any apparent solution (maybe I shouldn't be looking for a one :)) I have a very simple application with one page and with...
10
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario -------------...
2
by: Jay | last post by:
Getting into AJAX using the XMLHttp object and am really liking it. We are in the process of upgrading our existing behavior calls (webservice.htc) to the more 'supported', as they say, concept...
5
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
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,...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.