ASP. NET life cycle

Source: Internet
Author: User

Seq Events Control initialization ViewState available form data available What logic can be written here?
1 Init No No No Note: You can access the form data by using an ASP. NET Request object, but not through the server control.
Create controls dynamically if you must create them at run time, any initialization settings, master pages, and their settings. In this section we do not get viewstate, postedvalues, and already initialized controls.
2 Load View State Not guaranteed Yes Not guaranteed You can access the view state and any synchronization logic, and you want the viewstate to be pushed back into the background code variable that can be done here.
3 Postbackdata Not guaranteed Yes Yes Pinch to access the form data. Any logic that you want the form data to be pushed back into the background code variable can be done here.
4 Load Yes Yes Yes Here you can put in any logic you want to manipulate the controls, such as populating Combox from the database, sorting the data in the grid, and so on. For this event, we can access all controls, viewstate, and send values.
5 Validate Yes Yes Yes If your page has an authenticator or you want to perform validation on your page, do it here.
6 Event Yes Yes Yes If this is a postback that is changed by clicking the button or drop-down list, the related event will be triggered. Any logic associated with the event can be executed here.
7 Pre-render Yes Yes Yes If you want to make final changes to the UI object, such as changing the property structure or property values, before these controls are saved to viewstate.
8 Save ViewState Yes Yes Yes Once all modifications to the server control are complete, you can save the control data to view state.
9 Render Yes Yes Yes If you want to add some custom HTML to the output, you can do it here.
10 Unload Yes Yes Yes Do whatever you want to do to clean up the job.

ASP. NET life cycle

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.