469,946 Members | 2,002 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

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 1203
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by bobzimuta | last post: by
2 posts views Thread by verci | last post: by
7 posts views Thread by =?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?= | last post: by
11 posts views Thread by =?Utf-8?B?R2VyaGFyZA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.