首页 > Web开发 > 详细

ASP.NET 页生命周期概述

时间:2014-07-23 11:45:16      阅读:351      评论:0      收藏:0      [点我收藏+]
        protected void Page_PreInit(object sender, System.EventArgs e)
        {
            if (IsPostBack)
            {
                //Label1.Text += "Page.PreInti Event<br/>";
            }
        }

        protected void Page_Init(object sengder, EventArgs e)
        {
            Label1.Text += "Page.Init Event<br/>";
        }

        protected void Page_InitComplete(object sender, EventArgs e)
        {
            Label1.Text += "Page.InitComplete<br/>";
        }

        protected void Page_PreLoad(object sender, EventArgs e)
        {
            Label1.Text += "Page.PreLoad Event<br/>";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text += "Page.Load Event<br/>";
            if (Page.IsPostBack)
            {
                Label1.Text += "Send back request<br/>";
            }
        }

        protected void Page_LoadComplete(object sender, EventArgs e)
        {
            Label1.Text += "Page.LoadComplete Event<br/>";
        }

        protected void Page_PreRender(object sender, EventArgs e)
        {
            Label1.Text += "Page.PreRender Event<br/>";
        }

        protected void Page_Render(object sender, EventArgs e)
        {
            Label1.Text += "Page.Render Event";
        }

        protected void Page_Unload(object sender, EventArgs e)
        {
            //Label1.Text += "Page.Unload Event<br/>";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text += "Button.Click Event<br/>";
        }

  http://msdn.microsoft.com/zh-cn/library/ms178472.aspx#general_page_lifecycle_stages

ASP.NET 页生命周期概述,布布扣,bubuko.com

ASP.NET 页生命周期概述

原文:http://www.cnblogs.com/xiao-hei/p/3861621.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!