Asp.net does not display Sys.WebForms.PageRequestManager._initialize code

I am using ASP.NET 2.0 Ajax extensions on a website. as always, everything is fine on the local, but the remote website does not use ajax calls. ASP.NET Ajax extensions are installed on my local server, but the remote one does not work. I know that I should be able to use Ajax extensions without installing them. therefore, in turn, I added the extension .dll extensions among the links to the website, but still no luck.

after my further investigation, I found out that local and remote pages have exactly the same HTML code, except that local (working) 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 lines of code that make callbacks possible. the question is why is asp.net not making these lines? what may be missing?

by the way, ScriptResource.axd and WebResource.axd do not give 404 or something else, I can see through their js codes through Firebug.

and one more thing: I'm not sure if this is related or not, but on a page that does not display js code, there are also asp.net validators on the client side. again, they work fine locally.

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

+4
source share
2 answers

Did web.config set <xhtmlConformance mode = "Legacy" /> for the remote website?

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

+1
source

I had the same problem, but I was adding the ScriptManager control as a child control to the user control. I forgot to call the RenderControl method. As soon as I added this call, he added the above javascript lines. So I'm not sure if you are using a user control or not, but I'm sure that the Render routines are not being called for your ScriptManager in any way.

0
source

All Articles