Several changes in the ASP.NET 2.0 page framework

xiaoxiao2021-03-06  56

Added page event: In ASP.NET 2.0, an ASP.NET page is mainly (red font representing a new phase page event in ASP.NET 2.0): Client Request Page - "ONPREINIT - "OnInit -" OnInitComplete - "Load ViewState (iPostBackDataHandler) -" Page_ONPRELOAD- "Page_ONLOAD-" RaisePostDataChangeDevent - "Processing Retreat (RaisePostBackEvent) - "Page_OnLoadComplete-" pre-rendering (OnPreRender) - "to complete the pre-rendering (OnPreRenderComplete) -" save ControlState (SaveControlState) - "save ViewState (SaveViewState) -" render (render) - "Page_UnLoad. OnPreinit: Triggered before the initialization page OnInit event. In this stage, data information such as defining site topics or load sites can be performed. OnInitComplete: Complete the initialization page OnInit event trigger. OnPreload: Triggered before loading the page OnLoad event. OnLoadComplete: Complete the page to load the OnLoad event and trigger. OnPrenderComplete: Triggered after completing the pre-presented onprender event. This is the last level of completion of the page presented. After that, the page will not be able to make any modifications. SaveControlState: Save Control Status ControlState. ControlState is an attribute that the ASP.Net 2.0 control is similar, similar to the ViewState effect, but they differ in the configuration of ControlState to save more important control status information to ensure that the control status can be read and write. .

Increase the control of the page header: System.Web.ui.page new adds the Header property to the operation of the data in the HTML page area. By tracking the Header property, you can find that the Header property saves an object that implements the iPageHeader interface (this object has the four attributes of LinkedStyesheets, metadata, stylesheet, and title), actually through this object to implement the HTML page area Data operation. For example: