Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > interesting ajax issue

Reply
Thread Tools

interesting ajax issue

 
 
Guest
Posts: n/a
 
      08-01-2007
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!


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      08-01-2007
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)


http://www.velocityreviews.com/forums/(E-Mail Removed)am 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!
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX, XMLHttp, and webservice.htc. interesting find... Jay Javascript 2 10-15-2007 02:56 PM
AJAX IDE and AJAX TOOL--The Release of JoyiStar AJAX WebShop 3 Beta minnie Java 1 12-13-2006 06:29 AM
Interesting firefox issue Richard Computer Support 3 03-03-2005 07:39 PM
Interesting Issue Theo James Cisco 1 11-20-2003 12:47 PM
Interesting issue Sanjay Pandit MCSE 1 11-12-2003 08:20 AM



Advertisments