ScriptResourceDefinition.LoadSuccessExpression Property
.NET Framework (current version)
Gets or sets a JavaScript expression that is used to detect whether a JavaScript file loaded successfully.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
This property is used in conjunction with the ScriptManager.EnableCdnFallback property to render inline script that will revert to loading the library from a local server location if the script fails to load from the CDN.
For script libraries from Microsoft, this value is already set. If you want to register a script yourself and get CDN fallback support, you would set this property to an expression. For example, to test whether a jQuery library has been loaded, you can use an expression like the following:
typeof(window.jQuery) !== "undefined"
.NET Framework
Available since 4.5
Available since 4.5
Show: