Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

ASP.NET AJAX / scriptmanager problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JimL - 02 Aug 2007 15:05 GMT
Hi,

I've been given the job of "Ajaxifying" an existing application. If I
create a new test page in the application, Ajax works fine. However
when I add a scriptmanager and updatepanel to an existing page, it
doesn't work - the page just gets completely refreshed.

In each case, the Ajaxy parts of the .aspx file look identical, but
when I look at the HTML in the browser page, I find that in the
failing example, there is script at all for the scriptmanager.

Anyone suggest why this might be?

thanks,
Jim
JimL - 02 Aug 2007 15:25 GMT
> Hi,
>
[quoted text clipped - 6 lines]
> when I look at the HTML in the browser page, I find that in the
> failing example, there is script at all for the scriptmanager.

Sorry, that should be "no script at all"
Showjumper - 02 Aug 2007 23:28 GMT
So what i can gather from your post is that you are not getting the partial
page updates with the UpdatePanel, correct?
Make sure you have EnablePartialRendering set to true, also i found if the
code behind method has the handles clause on it then the partial page
updates dont work - the whole page posts back,

>> Hi,
>>
[quoted text clipped - 8 lines]
>
> Sorry, that should be "no script at all"
JimL - 03 Aug 2007 11:55 GMT
> So what i can gather from your post is that you are not getting the partial
> page updates with the UpdatePanel, correct?
> Make sure you have EnablePartialRendering set to true, also i found if the
> code behind method has the handles clause on it then the partial page
> updates dont work - the whole page posts back,

Thanks Showjumper, I've actually nailed it - the script wasn't being
rendered because the old web.config file has a tag :-

       <xhtmlConformance mode="Legacy"/>

comment that out, and "voila" all the scripting starts to work. This
wasn't mentioned in any of the documentation I looked at about adding
AJAX to existing projects, and it really ought to be heavily flagged,
as all my updates of our config file were correct, and I've had to
binary chop my way through the damn thing to find this. Of course, now
if I Google for "xhtml legacy ajax" there are all the other poor
suckers who have suffered from this bug.

Cheers everyone,
Jim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.