Click here to Skip to main content
Click here to Skip to main content
Go to top

PageManager control for ASP.NET

, 27 Oct 2010
Rate this:
Please Sign up or sign in to vote.
PageManager is a web server control which allows developers to easily integrate jQuery and JavaScript files.

Introduction

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:

Conclusion

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:

Update

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

License

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

Share

About the Author

Ludmal de silva
Architect
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 www.ludmal.net and e-mail him at ludmal@gmail.com. Twitter @ludmal
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 2 Pinmemberrobvon26-Oct-10 8:52 
GeneralIts CodeProject not PromoProject Pinmemberrobvon26-Oct-10 8:51 
GeneralRe: Its CodeProject not PromoProject PinmemberLudmal de silva26-Oct-10 21:22 
GeneralInteresting PinmemberYves25-Oct-10 12:25 
GeneralRe: Interesting PinmemberLudmal de silva25-Oct-10 14:49 
GeneralRe: Interesting PinmemberYves28-Oct-10 14:32 
GeneralRe: Interesting PinmemberLudmal de silva28-Oct-10 22:28 
GeneralMy vote of 1 Pinmembervgirimtech24-Oct-10 20:42 
GeneralIncomplete Article PinmemberVenkatesh Mookkan21-Oct-10 17:12 
GeneralRe: Incomplete Article PinmemberLudmal de silva21-Oct-10 19:25 
GeneralMy vote of 5 PinmemberChannaJ*21-Oct-10 14:52 
GeneralMy vote of 5 PinmemberEric Xue (brokensnow)21-Oct-10 11:05 
GeneralImages Pinmembercrb900021-Oct-10 8:35 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 28 Oct 2010
Article Copyright 2010 by Ludmal de silva
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid