Click here to Skip to main content
15,567,658 members
Articles / Web Development / ASP.NET
Posted 21 Oct 2010


34 bookmarked

PageManager control for ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.50/5 (10 votes)
27 Oct 2010CPOL2 min read
PageManager is a web server control which allows developers to easily integrate jQuery and JavaScript files.


PageManager is a web server control which allows developers to easily integrate jQuery and JavaScript files in ASP.NET Web applications.

PageManager control is included in the Extensible Web Toolkit (XWT). Please download the Toolkit in order to use PageManager control:

The key features of the PageManager control are:

  • jQuery support PageManager control includes the latest jQuery file.
  • jQuery CDN supportPageManager control includes the latest CDN URL.
  • Custom JavaScript files inclusion – You can include your own JavaScript files in PageManager control.
  • Web.config file support – All the PageManager control’s functionality can be easily implement through web.config file.

Example - jQuery Support

Latest jQuery library (1.4.2) is integrated into the PageManager control.

Drag and drop PageManager control into an ASP.NET page and start writing jQuery code.

Write a simple jQuery function and view in the browser:

Example – jQuery CDN Support

You can use CDN for jQuery by simply setting the EnableCDN property to true. This can be done for a specific ASP.NET page or for the entire application using the web.config file. You can also change the CDN URL by using setting the CDNUrl property. CDN support is disabled by default however.

Example – Custom JavaScript Files Inclusion

You can include any JavaScript file using Scripts property. This can be done for the entire application through web.config file as well.

You can also enable/disable a particular script file using Enable property.

Example - Using web.config File to Setup PageManager for the Entire Application

All the following functionalities can be done using web.config file. However, these settings can be overridden by the ASP.NET page's PageManager settings.

  • Add a different jQuery file
  • Enable/Disable jQuery file
  • Enable/Disable jQuery CDN
  • Set jQuery CDN URL
  • Add JavaScript files
  • Enable/Disable individual JavaScript file

Settings in customScripts section:

  • enable - Enable/disable all the script files
  • CDNUrl – URL for the CDN location
  • EnableCDN - Enable/disable CDN
  • JQueryFile - jQuery file to be used

Settings in scripts section:

  • id - File Id
  • path - Path for the script file
  • enable - Enable/disable script file include

In order to use PageManager control in web.config, you must first add the configuration section as shown in the following screen capture:

You can also add JavaScript files for the entire application using scripts section as shown in the following screen capture:


PageManager control can be useful when you write script intensive web applications. It includes latest jQuery file and JavaScripts can be managed by the web.config. There are many more other useful and lightweight controls in XWT. You can download the complete XWT toolkit from here.

Read more on Extensible Web Toolkit:


Please read the following article on MessageControl--another XWT control which lets you display user messages like in Gmail application:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Singapore Singapore
Ludmal is a Software Architect, technical author and trainer with over 10 years experience in the software development industry. He is a MCPD and MCTS on enterprise application development. He mainly researches on SOA & Web performance. You can read his blog at and e-mail him at Twitter @ludmal

Comments and Discussions

GeneralMy vote of 2 Pin
robvon26-Oct-10 9:52
robvon26-Oct-10 9:52 
GeneralIts CodeProject not PromoProject Pin
robvon26-Oct-10 9:51
robvon26-Oct-10 9:51 
GeneralRe: Its CodeProject not PromoProject Pin
Ludmal de silva26-Oct-10 22:22
Ludmal de silva26-Oct-10 22:22 
GeneralInteresting Pin
Yves25-Oct-10 13:25
Yves25-Oct-10 13:25 
GeneralRe: Interesting Pin
Ludmal de silva25-Oct-10 15:49
Ludmal de silva25-Oct-10 15:49 
GeneralRe: Interesting Pin
Yves28-Oct-10 15:32
Yves28-Oct-10 15:32 
GeneralRe: Interesting Pin
Ludmal de silva28-Oct-10 23:28
Ludmal de silva28-Oct-10 23:28 
GeneralMy vote of 1 Pin
vgirimtech24-Oct-10 21:42
vgirimtech24-Oct-10 21:42 
GeneralIncomplete Article Pin
Venkatesh Mookkan21-Oct-10 18:12
Venkatesh Mookkan21-Oct-10 18:12 
GeneralRe: Incomplete Article Pin
Ludmal de silva21-Oct-10 20:25
Ludmal de silva21-Oct-10 20:25 
GeneralMy vote of 5 Pin
ChannaJ*21-Oct-10 15:52
ChannaJ*21-Oct-10 15:52 
GeneralMy vote of 5 Pin
Eric Xue (brokensnow)21-Oct-10 12:05
Eric Xue (brokensnow)21-Oct-10 12:05 
GeneralImages Pin
crb900021-Oct-10 9:35
crb900021-Oct-10 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.