<configuration> <system.web> <httpModules> <add name="wwScriptCompressionModule" type="Westwind.Web.Controls.wwScriptCompressionModule,Westwind.AjaxToolKit"/> </httpModules> </system.web> </configuration>
This module basically enables compression of any script resources that normally would be loaded through WebResource.axd. Once hooked internal resource compression of the wwHoverPanel script library is automatic and no further changes are required.
To use this script compression with your own script resources you can use code like the following:
ClientScriptProxy.Current.RegisterClientScriptResource(this, typeof(ResourceLibTest.ControlResources), ResourceLibTest.ControlResources.JSON_SCRIPT_RESOURCE);
ClientScriptProxy detects whether the module is installed and if it is compresses script resources. ClientScriptProxy is also MS Ajax aware and so detects the presence of MS Ajax. If present it will delegate to MS Ajax resource compression (note though that MS Ajax Resource Compression requires an MS Ajax ScriptManager control on the page).