|
|
|
start date: Wed, 1 Aug 2007 14:13:33 -0500,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
am
|
|
2
bruce barker
|
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!
Date:Wed, 1 Aug 2007 14:13:33 -0500
Author:
|
Re: interesting ajax issue
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)
param@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!
>
>
Date:Wed, 01 Aug 2007 13:50:09 -0700
Author:
|
|
|