ASP.NET Cheat Sheet

Reviews
Microsoft ASP.NET AJAX Client Life-Cycle Events The two main Microsoft AJAX Library classes that raise events during the client life cycle of a page are the Application and PageRequestManager classes. The key event for initial requests (GET requests) and synchronous postbacks is the load event of the Application instance. When script in a load event handler runs, all scripts and components have been loaded and are available. When partial-page rendering with UpdatePanel controls is enabled, the key client events are the events of the PageRequestManager class. These events enable you to handle many common scenarios. These include the ability to cancel postbacks, to give precedence to one postback over another, and to animate UpdatePanel controls when their content is refreshed. To add or remove handlers for events raised by the Application and PageRequestManager classes, use the add_eventname and remove_eventname methods of those classes. Note: To handle the load and unload events of the Application object, you can create functions that use the reserved names pageLoad and pageUnload. function pageLoad() { var prm = Sys.WebForms.PageRequestManager.getInstance(); if (!prm.get_isInAsyncPostBack()) prm.add_beginRequest (onBeginRequest); } Sys.WebForms.PageRequestManager Events initializeRequest beginRequest Raised during initialization of an asynchronous postback. Raised before processing of an asynchronous postback starts, and the postback request is sent to the server. If there is a postback already processing, it is stopped using the abortPostBack method. Raised after a response to an asynchronous postback is received from the server, but before any content on the page is updated. Raised after all content on the page is refreshed as the result of either a synchronous or an asynchronous postback. Raised after an asynchronous postback is finished and control has been returned to the browser. If an error occurs, the page is not updated. Use this event to provide customized error notification to users or to log errors. pageLoading pageLoaded endRequest Sys.Application Events init load Raised only once when the page is first rendered after all scripts have been loaded, but before objects are created. Raised after all scripts have been loaded and objects in the application have been created and initialized. Raised also for all postbacks to the server, which includes asynchronous postbacks. Raised before all objects in the client application are disposed. During this event you should free any resources that your code is holding. unload Based on Microsoft AJAX Library 1.0 • Compiled by Milan Negovan • www.AspNetResources.com • Last update: 2007-08-08

Related docs
Asp.Net
Views: 941  |  Downloads: 40
SharePoint Cheat Sheet
Views: 33  |  Downloads: 11
SharePoint Cheat Sheet
Views: 328  |  Downloads: 47
An Introduction to ASP.NET 2.0
Views: 147  |  Downloads: 46
ASPNET Basics
Views: 131  |  Downloads: 20
An Introduction to ASP.NET MVC
Views: 19  |  Downloads: 5
Asp.net MVC
Views: 7  |  Downloads: 1
Master Pages in ASP.NET 2.0
Views: 659  |  Downloads: 170
ASP.Net Development
Views: 48  |  Downloads: 11
asp.net tutorials
Views: 674  |  Downloads: 145
ASP.Net Bible
Views: 1439  |  Downloads: 182
Other docs by Cheatsheets
XML Cheat Sheet
Views: 123  |  Downloads: 7
XHTML Cheat Sheet
Views: 94  |  Downloads: 5
WordPress Cheat Sheet
Views: 117  |  Downloads: 22
Web Developer SEO Cheat Sheet
Views: 79  |  Downloads: 11
Web Design Cheat Sheet
Views: 64  |  Downloads: 6
Trust Cheat Sheet
Views: 71  |  Downloads: 7
Trig Cheat Sheet
Views: 137  |  Downloads: 3
Travel Cheat Sheet
Views: 93  |  Downloads: 2
The Gimp Cheat Sheet
Views: 88  |  Downloads: 7
TARP Cheat Sheet
Views: 158  |  Downloads: 5
Spanish Cheat Sheet
Views: 185  |  Downloads: 1
SharePoint Cheat Sheet
Views: 125  |  Downloads: 7
Second LIfe Cheatsheet
Views: 55  |  Downloads: 1
Ruby on Rails Cheat Sheet
Views: 67  |  Downloads: 6
RSS Cheat Sheets
Views: 81  |  Downloads: 8