if we want to do something after the UpdatePanel load is done we need to use JS<script type= "Text/javascript" >// to ScriptManager instance Add the JS method Sys.WebForms.PageRequestManager.getInstance () to execute after loading successfully . add_pageloaded (onpageloaded); // The following method is your own code function onpageloaded (sender, args) { // do something}</script>
//******* begin:application event operation. ******* //Hook up Application event handlers. "Associating operations for application events" varApp =sys.application;//add an action for a application load eventapp.add_load (applicationload);//Adding an action to initialize an application eventApp.add_init (applicationinit);//add an action that application frees resource eventsapp.add_disposing (applicationdisposing);//add an action for an application unload eventapp.add_unload (applicationunload); //application event handlers for component developers. "Application events action for component open people calls" //application initialization events, invoking other event actions within the initialization eventfunctionApplicationinit (sender) {//Get PageRequestManager Instance varPRM =Sys.WebForms.PageRequestManager.getInstance (); //if it is not an asynchronous loopback, execute the if(!Prm.get_isinasyncpostback ()) { //to add an action to initialize a request event for an instance of PageRequestManagerprm.add_initializerequest (initializerequest); //to add an action to start a request event for an instance of PageRequestManagerprm.add_beginrequest (beginrequest); //Add a page loading event action for an instance of PageRequestManagerprm.add_pageloading (pageloading); //add a page loaded event action for an instance of PageRequestManagerprm.add_pageloaded (pageLoaded); //to add an end request event action for an instance of PageRequestManagerprm.add_endrequest (endRequest); } //The display is currently initialized in application. $get (' clientevents '). InnerHTML + = "APP:: Application init." Application Initialization <br/> ";}//application action to load eventsfunctionapplicationload (sender, args) {$get (' Clientevents '). InnerHTML + = "APP:: Application load." Application Load ""; //Sys.applicationloadeventargs instance of the args Get_ispartialload method to check whether a partial refresh. //gets whether the current load event is triggered by the first time the trigger is opened or by an asynchronous flush. $get (' clientevents '). InnerHTML + = "(Ispartialload =" + args.get_ispartialload () + ")" Partial refresh <br/> "; /*-----------------------------------------------* About the Ispartialload property of the ApplicationLoadEventArgs class * The effect of this property: Returns whether a page is partially refreshed. * Syntax: var a = new Sys.applicationloadeventargs (components, ispartialload); If A.get_ispartialload () {}; * Return value Meaning: True indicates that the page is partially refreshed; Otherwise, false is returned. * * Description: (this is important!) * To get (get) or set the properties of the client API, it must be implemented through a property access method prefixed with get_ and set_. * For example, to set the Cancel property, pass the Get_cancel or Set_cancel method. * -----------------------------------------------*/}//application actions for unload eventsfunctionApplicationunload (Sender) {alert (' APP:: Application unload. ' Application Uninstall ');}//application action to release resource eventsfunctionapplicationdisposing (Sender) {$get (' Clientevents '). InnerHTML + = "APP:: Application disposing." Application Release <br/> "; }//Application event handlers for page developers. "Application Events action for page Open people calls"//Page Load Events/*Description: * To manipulate the load and unload events of the Application object, you do not need to bind the display to an action event. * Use reserved keywords pageload and pageunload to create a function directly*/functionpageload () {$get (' Clientevents '). InnerHTML + = "page:: Load." Pages load <br/> ";}//page Unload EventfunctionPageunload () {alert (' Pages:: page unload. ');}//******* end:application event operation. ********
C # UpdatePanel loading complete callback JS