ASP. NET page object event execution sequence

Source: Internet
Author: User

Page. Preinit
Occurs when page initialization starts.
Page. init
It occurs when the server control is initialized. Initialization is the first step of the control's lifetime. (Inherited from control .)
Page. initcomplite
Occurs when page Initialization is complete.
Page. Preload
Occurs before the page load event
Page. Load
This occurs when the server control is loaded to the page object. (Inherited from control
Page. loadcomplete
Occurs when the page lifecycle loading stage ends.
Page. prerender
Occurs after the control object is loaded and before it is rendered. (Inherited from control .)
Page. prerendercomplete
Occurs before the page content is displayed.

2. The execution sequence of masterpage and contentpage events when masterpage is used

Event name
Note
Contentpage. preinit
Masterpage. init
Contentpage. init
Contentpage. initcomplite
Contentpage. Preload
Contentpage. Load
Masterpage. Load
Contentpage. loadcomplete
Contentpage. prerender
Masterpage. prerender
Contentpage. prerendercomplete

3. Use the execution sequence of the page, basepage, and page events inherited from basepage.

Corresponding to the order of "1. Separate aspx pages", first execute the basepage event and then execute the page event.

4. When you use a page inherited from basepage as the masterpage contentpage

2. When masterpage is used, the execution sequence of masterpage and contentpage events is basepage and page.

 

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.