tags:

views:

1486

answers:

2

i'm using the ASP.NET 2.0 Ajax Extensions on a web site. as always, everything is fine on local but the remote web site does not use ajax calls. my local server has the ASP.NET Ajax extensions installed but the remote one doesn't. i know that i should be able to use the Ajax extensions without installing them. so in turn, i added the extensions' .dll among the web site's references but still no luck.

after my further investigation, i found out that local and remote pages have exactly the same HTML code rendered, except that the local (working) one has these lines

//<![CDATA[ Sys.WebForms.PageRequestManager._initialize('ctl00$ContentPlaceHolder1$ScriptManager1', document.getElementById('aspnetForm')); Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder1$updReportArgs','tctl00$ContentPlaceHolder1$updReport'], ['ctl00$ContentPlaceHolder1$chkTumu','ctl00$ContentPlaceHolder1$btnGetir'], [], 90); //]]>

obviously, these are the lines of code that make callbacks possible. the question is why doesn't asp.net render these lines? what could be missing?

by the way, the ScriptResource.axd and WebResource.axd doesn't give a 404 or anything, i can see through their js codes via Firebug.

and one more thing: i'm unsure if it is related or not, but there are client-side asp.net validators on the page whose js code are not rendered either. again, those work fine locally.

for further investigation you can see the remote site here : http://www.ajitatif.com/subdomains/nazer/Raporlar/danismanbasarim.aspx

A: 

I had this same problem but I was adding a ScriptManager control as a child control to a custom user control. I forgot to make a call to the RenderControl method. Once I added that call, it added the aforementioned lines of javascript. So I'm not sure if you are using a user control or not, but I'm pretty sure the Render routines are not being called for your ScriptManager somehow.

Nate
A: 

Does the web.config for the remote web site have <xhtmlConformance mode="Legacy"/> set?

This setting prevents partial page updates from working. Change the mode to Transitional or Strict, or remove the xhtmlConformance setting.

http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

Joseph Anderson

related questions