Replace "Framework" scripts in ASP.NET Ajax
A user reported at newsgroups there being an issue in Safari 1.3.2 with ASP.NET Ajax's release mode scripts. He said that release script wouldn't parse and suspects it relates to the compression (script being on one line) as with debug script it works just fine. He also said that on later Safari versions it works in both modes.
In cases like this you can:
- take a copy of the built-in script files needing replaced functionality
- put them say on some folder on your application
- fix what needs to be fixed in the files.
Then just give Path to them in ScriptManager to get them in use (give also the Name despite that documentation says you'd need only Name or Path)
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Name="MicrosoftAjax.js" Path="[directory to look for]/MicrosoftAjax.js" />
<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="[directory to look for]/MicrosoftAjaxWebForms.js" />
</Scripts>
</asp:ScriptManager>
(You can also set ScriptPath of the ScriptManager in case you want to do it for all files at once)
This changes things so that these are looked from the location given in the path, not by loading from script resources, and it lets you modify them at will. Very easy fixing in case needed.
Note: Bertrand has great post covering the same ground:
How to work around the access denied cross-domain frame issue in ASP.NET Ajax 1.0
http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx
Relevant documentation entries:
ScriptReference
http://ajax.asp.net/docs/mref/T_System_Web_UI_ScriptReference.aspx
Path property
http://ajax.asp.net/docs/mref/P_System_Web_UI_ScriptReference_Path.aspx