Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET AJAX / scriptmanager problem

Reply
Thread Tools

ASP.NET AJAX / scriptmanager problem

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

 
Reply With Quote
 
 
 
 
JimL
Guest
Posts: n/a
 
      08-02-2007
On 2 Aug, 15:05, JimL <(E-Mail Removed)> wrote:
> 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.


Sorry, that should be "no script at all"

 
Reply With Quote
 
 
 
 
Showjumper
Guest
Posts: n/a
 
      08-02-2007
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,

"JimL" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> On 2 Aug, 15:05, JimL <(E-Mail Removed)> wrote:
>> 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.

>
> Sorry, that should be "no script at all"
>



 
Reply With Quote
 
JimL
Guest
Posts: n/a
 
      08-03-2007
On 2 Aug, 23:28, "Showjumper" <nlsdkfja> wrote:
> 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

 
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
asp ScriptManager vs. AjaxToolkit ScriptManager asp.net ajax ASP .Net 2 12-21-2009 03:37 PM
AJAX in ASP.Net ScriptManager error Steve Kershaw ASP .Net 2 04-25-2007 09:42 PM
Ajax - Master Pages - ScriptManager - Web User Controls =?Utf-8?B?TGFycnkgRXBu?= ASP .Net 1 02-26-2007 02:31 AM
Installing Ajax RC1 - ---- Element 'ScriptManager' is not a known element Elmo Watson ASP .Net 1 01-19-2007 12:01 AM



Advertisments