interesting ajax issue

G

Guest

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!
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top