zoukankan      html  css  js  c++  java
  • WEB页面自打开的响应顺序

    WEB页面自打开,在你按下按钮之前,会有如下响应依次发生:

     private int i = 1;
        
    protected override void OnPreInit(EventArgs e)
        
    {
            
    base.OnPreInit(e);
            Response.Write(i
    ++);
            Response.Write(
    "<br />");
        }

        
        
    protected override void OnPreLoad(EventArgs e)
        
    {
            
    base.OnPreLoad(e); 
            Response.Write(i
    ++);
            Response.Write(
    "<br />");
            
        }


        
    protected override void OnLoad(EventArgs e)
        
    {
            
    base.OnLoad(e);
            Response.Write(i
    ++);
            Response.Write(
    "<br />");
        }


       
    protected override void OnInit(EventArgs e)
        
    {
            
    base.OnInit(e);
            Response.Write(i
    ++);
            Response.Write(
    "<br />");
        }

    当然,在你按下按钮之后自然是按钮响应,然后还会有一个响应发生:

    按钮响应结束后,还会有一个响应发生:

    protected override void OnLoadComplete(EventArgs e)
        
    {
            
    base.OnLoadComplete(e);
            Response.Write(i
    ++);
            Response.Write(
    "<br />");
        }

     这样,当你页面全部打开后,页面的左上角会依次显示“1,2,3,4,5”,也即是这五个响应。

    刚才查了一下,其实全部的响应如下:

     1FrameworkInitialize
     2InitializeCulture
     3OnPreInit
     4OnInit
     5TrackViewState
     6OnInitComplete
     7OnPreLoad
     8OnLoad
     9Page_Load
    10OnLoadComplete
    11EnsureChildControls
    12CreateChildControls
    13OnPreRender
    14OnPreRenderComplete
    15OnSaveStateComplete
    16RenderControl
    17Render
    18RenderChildren 
  • 相关阅读:
    python3编译安装no module named _ssl
    java中的、标识符、运算符以及数据类型之间的转换。
    Java中的基本数据类型
    java中的类和对象
    什么是JDK,JRE
    HTML是什么
    test
    Obtain older GMT versions
    How to understand three foundanmental faults?
    wilber3申请数据的直接目录寻找
  • 原文地址:https://www.cnblogs.com/tonybinlj/p/1297817.html
Copyright © 2011-2022 走看看