I have upgraded an Ajax-enabled ASP.NET site that I'm working on to use the latest ASP.NET AJAX Extenstion Beta 2. My site use external javascript files that is being registered with the ScriptManager, like:
<asp:ScriptManager runat="server" ID="ScriptManager1">
<Scripts>
<asp:ScriptReference Path="~/scripts/script_file1.js" />
<asp:ScriptReference Path="~/scripts/script_file2.js" />
</Scripts>
</asp:ScriptManager>
After upgrading to Beta 2, any functionality that needs to use functions inside those files, was giving errors?!
After reading the "Changes between the ASP.NET AJAX (“Atlas”) CTP and the Beta 2 and RTM Releases", I come to know that every external Javascript files that being referenced from ScriptManager must have a call to Sys.Application.notifyScriptLoader; this will notify the Sys.Application that the script files has been downloaded to the client computer, so for each external .js file add the following snippet:
if(typeof(Sys) !== "undefined")
Sys.Application.notifyScriptLoaded();
Another solution that Alessandro Gallo has blog it is to add the following snippet to the end of each .js file:
if(Sys && Sys.Application) {
Sys.Application.notifyScriptLoaded();
}