ASP. NET page event process-page_init () and page_load ()

Source: Internet
Author: User

After testing this morning, we figured out the execution process when there are multiple user controls on the page.
Usercontrol1.ascx and usercontrol2.ascx are user controls created in test. aspx successively:

Procedure Test. aspx Usercontrol1.ascx Usercontrol2.ascx
1   Oninit  
2   Init  
3     Oninit
4     Init
5 Oninit    
6 Init    
7 Load    
8   Load  
9     Load
10 (Buttom_click ...) (Buttom_click ...) (Buttom_click ...)
11 Prerender    
12   Prerender  
13     Prerender
14   Unload  
15     Unload
16 Unload    
    1. When init is triggered, the control is available, but the control is not initialized through the viewstate object.
    2. After all controls are initialized through the viewstate object, load
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.