JavaScript Script Management Components

This toolkit provides a number of helper classes that makes working with JavaScript from server side code easier. The following components are provided:

  • ClientScriptProxy - ClientScript and ScriptManager Front End
    Provides a consistent interface to the ClientScript or ScriptManager objects depending on which is available which is crucial for control developers. Also provides for JavaScript Compression without ScriptManager if the ScriptCompression module is installed. Also provides ability to add script references to pages in the Html header including the ability to specify where scripts are loaded (HeaderTop,HeaderBotton,Inline). Also provides CSS embedding in header.

  • ScriptContainer - JavaScript Script Embedding
    ScriptContainer is a visual control that allows scripts to be embedded into a page with features similar to ScriptManager, but without requiring ScriptManager and the Microsoft AJAX Client Library. This control also allows specification for script location (HeaderTop,HeaderBottom,Inline), the ability to use .min.js files automatically in release mode and the ability to load script from resources while still providing Intellisense in the page.

  • ScriptVariables - Embed Server Side Values into Client Side JavaScript Code
    The ScriptVariables component allows you create one or more client side JavaScript objects that holds members based on values that you add to the control. A single JavaScript object is created with one property for each key added. The component handles proper encoding of all values into JavaScript so that strings, numbers and dates properly translate into their JavaScript values. This component can also add properties for all ClientIds in a page by automatically adding client ID properties where the control name plus an Id suffix is created (ie. serverVars.txtNameId). Finally this control can also optionally persist any client side changes made back to the server.

  • JavaScript Resource gZip Compression
    JavaScript Resources stored in assemblies can be served via the ScriptCompression module which provides script compression by removing most white space and GZip compression if browser supported.

  • Localized Server Resources Exposed to JavaScript
    The Westwind.Globalization assembly includes an HTTP Handler that has the ability to persist server side resources into client side JavaScript code via objects. Each object represents a resource set with one property for each localization resource. This is a great way to localize in one place (server resources) and use the resources both on the server and on the client. The handler can automatically load local and global resources for the current locale or you can manually control which resource sets to load.


© West Wind Technologies, 1996-2016 • Updated: 12/19/15
Comment or report problem with topic