Sequential order of page events in asp.net
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_336_280.htm "frameborder=" 0 "width=" scrolling= "no" height= "282" ></iframe> |
The customer issues a POST request-〉 create a page derived class, call the constructor-〉 call the Ihttphandler.processrequest method of the page class-〉 activate the Init event for the page class-〉 Call the CreateChildControls virtual method of the page class-〉 restore server-side control state from post variables and ViewState-〉 activate the page class Load event-〉 Activate server-side control Events-〉 Activate the page class PreRender event- Call the render virtual method of the page class-〉 call the RenderChildren virtual method of the page class-〉 send an HTTP response to the client-〉 activate the page class Unload event-〉 Discard instances of the page derived class.
The event is activated in Page execution in the following order:
Page.preinit
Page.Init
Page.initcomplite
Page.preload
Page.load
Page.loadcomplete
Page.prerender
Page.prerendercomplete
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_468_60.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe> if the page inherits from a page, such as BasePage : System.Web.UI.Page, some extensions have been made in basepage, such as permission checking, while other pages inherit from BasePage, the order of event activation for BasePage and final page is the
UI. PreInit the
Page.preinit
UI. Init
Page.Init
UI. Initcomplite the
Page.initcomplite
UI. Preload the
Page.preload
UI. The Load
Page.load
UI. LoadComplete the
Page.loadcomplete
UI. PreRender the
Page.prerender
UI. Prerendercomplete
Page.prerendercomplete
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_468_60.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe> if masterpage is used, Then the events in MasterPage and events in Contentpage are activated in the following order:
Contentpage.preinit
Master.init
Contentpage.init
Contentpage.initcomplite
Contentpage.preload
contentpage.load
Master.load
Contentpage.loadcomplete
Contentpage.prerender
Master.prerender
Contentpage.prerendercomplete
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_468_60.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe> Further, If Contentpage inherits BasePage, the order in which the events are executed becomes:
Ui. PreInit
Contentpage.preinit
Master.init
Ui. Init
Contentpage.init
Ui. Initcomplite
Contentpage.initcomplite
Ui. Preload
Contentpage.preload
Ui. Load
Contentpage.load
Master.load
Ui. LoadComplete
Contentpage.loadcomplete
Ui. PreRender
Contentpage.prerender
Master.prerender
Ui. Prerendercomplete
Contentpage.prerendercomplete
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_468_60.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe>
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_ads_468_15.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe>
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_syndication_468_60.htm "frameborder=" 0 "width=" 470 "scrolling=" no "height=" ></iframe>
Search for other related resources, please use Google search:
<iframe border= "0" name= "I1" align= "Middle" marginwidth= "1" marginheight= "1" src= "http://www.b199.cn/blog_ads/ Google_search_40.htm "frameborder=" 0 "width=" 460 "scrolling=" no "height=" ></iframe>