Asp. NET most commonly used page life-cycle Events

Source: Internet
Author: User

PreInit: An event that can be accessed in the early stages of the page life cycle. After the PreInit event, personalization information and page themes are loaded.

Init: Raised after all controls have been initialized and all appearance settings have been applied. Use this event to read or initialize the properties of a control.

InitComplete: Occurs when page initialization is complete.

Preload: Performs processing on the page or control before the Load event. After the page raises the event, it loads the view state for itself and all the controls, and then processes the request instance to include any postback data.

Load: Occurs when a server control is loaded into a Page object. Use the IsPostBack page property to check whether the page is processed for the first time. If this is the first process, data binding is performed.

LoadComplete: Occurs at the end of the load phase of the page's life cycle.

PreRender: Occurs after the control object is loaded and before it is rendered. The PreRender event occurs for each control on the page. Use this event to make a final change to the contents of a page or control.

Savestatecomplete: Occurs after the page finishes saving all view state and control state information for controls on the page.

Unload: Occurs when a server control is unloaded from the content. This includes operations such as cleaning up open database connections, discarding objects, or closing open files.

Asp. NET most commonly used page life-cycle Events

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.