Mike Ormond's Blog

Musings on mobile development and Windows Phone 7 in particular.

Calling Sys.Application.notifyScriptLoaded

Calling Sys.Application.notifyScriptLoaded

  • Comments 1

Just noticed this: "Do not call the notifyScriptLoaded method from scripts that are embedded in assemblies. The script resource handler adds an instance of this call, and a second call will cause an error." having run into the error when playing around over the weekend. (That statement is from http://asp.net/ajax/documentation/live/ClientReference/Sys/ApplicationClass/SysApplicationNotifyScriptLoadedMethod.aspx).

Sure enough, when I inspect the scripts that's exactly what happens. So with reference to my previous post on Embedding Resources you should either remove / comment out that statement when you embed the script or set the NotifyScriptLoaded property of the relevant ScriptReference object to false.

Technorati Tags: ,