473,804 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ 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="con ditional". 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 1301
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="con ditional". 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
4328
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 from within an inline function. Within the AJAX object: this.xmlhttp = new XMLHttpRequest(); this.response = ''; //to contain the response text OR xml var that = this; //since we cannot reference this within the
4
7712
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 Ajax.Request( url, {method: 'post', parameters: params, onComplete: evalInfo }); function evalInfo( request ) { // do stuff with request
2
2139
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, until I press the back and forward buttons in my browser then the AJAX magic is lost alongside with all the data in my AJAX controls when I tried to get back to the AJAX page, can anybody help me solve this issue, I've read that this is the...
7
2811
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 just ScriptManager object in it. Every time I refresh the page the memory usage goes up. I have AJAX extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem, and how did you guys cope with this problem? Please reply asap... i am...
10
3487
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 ------------- I have perl script which simply runs a ps on a Solaris server and generates a static html page with all of the code perfectly and this html page works fine when viewing it statically or with a META REFRESH header tag. The idea is to give the user...
2
3298
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 of AJAX. One thing I noticed was that the .htc code practically does the same thing AJAX does - with nice code that allows you to .value reference the return XML nice and easily - and now I'm wondering why I should even bother trying to reinvent...
5
3114
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 copied the application to the server, setup the website, installed the ajax extensions, also loaded/enabled front end extensions so i could load the site in visual studio 2005. when i attempt to run the site, either from the server or from another pc...
6
2644
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 in the page and I've got code to get the selected value from it in the Radiobuttonlist_SelectedIndexChanged event. The code in there is: Protected Sub rblFMSValue_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
11
3056
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 and IE8. There is no issue when the controls are allowed to complete loading. Can you please tell me the best practice that handles this? Thanks.
0
10561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
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 we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.