页面生命周期小结

代码:   

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("Page_Load<br>");
    }
    protected void Page_PreInit(object sender, EventArgs e)
    {
        Response.Write("Page_PreInit<br>");
    }
    protected void Page_InitComplete(object sender, EventArgs e)
    {
        Response.Write("Page_InitComplete<br>");
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        Response.Write("Page_Init<br>");
    }
    protected void Page_PreRender(object sender, EventArgs e)
    {
        Response.Write("Page_PreRender<br>");
    }
    protected void Page_Render(object sender, EventArgs e)
    {
        Response.Write("Page_Render<br>");
    }
    protected void Page_LoadComplete(object sender, EventArgs e)
    {
        Response.Write("Page_LoadComplete<br>");
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Write("Button1_Click<br>");
    }

结果:

    Page_PreInit
    Page_Init
    Page_InitComplete
    Page_Load
    Button1_Click
    Page_LoadComplete
    Page_PreRender

posted @ 2013-06-02 21:17  等一个晴天  阅读(131)  评论(0编辑  收藏  举报