日志不说谎--Asp.net的生命周期

  为了学习Asp.net的生命周期,我做了两个试验,记录下了日志,大家先看日志,我有问题:

试验1:页面上有一个ClientCallBack的功能;下面记录的是页面载入之后点击按钮执行ClientCallback

2007-11-05 09:16:04,203 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_PageInit
2007-11-05 09:16:06,687 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_Init
2007-11-05 09:16:06,687 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_InitComplete
2007-11-05 09:16:06,687 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_PreLoad
2007-11-05 09:16:06,687 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_Load
2007-11-05 09:16:15,250 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_LoadComplete
2007-11-05 09:16:15,250 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_PreRender
2007-11-05 09:16:15,265 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_SaveStateComplete
2007-11-05 09:16:15,343 [3448] Info ASP.test_aspx - Asp.net生命周期研究--Page_Unload
2007-11-05 09:28:34,015 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_PageInit
2007-11-05 09:28:36,078 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_Init
2007-11-05 09:28:36,078 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_InitComplete
2007-11-05 09:28:36,109 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_PreLoad
2007-11-05 09:28:36,109 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_Load
2007-11-05 09:28:36,109 [3724] Info ASP.test_aspx - [Asp.net+控件生命周期]--Page.IsCallback=true;
2007-11-05 09:28:36,109 [3724] Info ASP.test_aspx - [Asp.net+控件生命周期]--Page.IsPostBack=true;
2007-11-05 09:28:37,015 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_LoadComplete
2007-11-05 09:28:37,015 [3724] Info ASP.test_aspx - Asp.net生命周期研究--RaiseCallbackEvent();
2007-11-05 09:28:37,015 [3724] Info ASP.test_aspx - Asp.net生命周期研究--GetCallbackResult()
2007-11-05 09:28:37,015 [3724] Info ASP.test_aspx - Asp.net生命周期研究--Page_Unload

试验2:页面上有一个UpdatePanel,里面放了一个按钮;页面载入之后点击按钮TestButton

2007-11-05 09:07:11,312 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreInit
2007-11-05 09:07:11,312 [3448] Info UserControl - 控件生命周期--Page_Init
2007-11-05 09:07:11,312 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Init
2007-11-05 09:07:11,312 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_InitComplete
2007-11-05 09:07:11,312 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreLoad
2007-11-05 09:07:11,312 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Load
2007-11-05 09:07:11,640 [3448] Info UserControl - 控件生命周期--Page_Load
2007-11-05 09:07:11,640 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_LoadComplete
2007-11-05 09:07:11,640 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreRender
2007-11-05 09:07:11,640 [3448] Info UserControl - 控件生命周期--Page_PreRender
2007-11-05 09:07:11,640 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_SaveStateComplete
2007-11-05 09:07:11,734 [3448] Info UserControl - 控件生命周期--Page_Unload
2007-11-05 09:07:11,734 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Unload
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreInit
2007-11-05 09:07:27,046 [3448] Info UserControl - 控件生命周期--Page_Init
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Init
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_InitComplete
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreLoad
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Load
2007-11-05 09:07:27,046 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page.IsPostBack=true;
2007-11-05 09:07:27,109 [3448] Info UserControl - 控件生命周期--Page_Load
2007-11-05 09:07:27,109 [3448] Info ASP.default_aspx - [首页+控件生命周期]-- TestButton_Click()
2007-11-05 09:07:27,109 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_LoadComplete
2007-11-05 09:07:27,109 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_PreRender
2007-11-05 09:07:27,171 [3448] Info UserControl - 控件生命周期--Page_PreRender
2007-11-05 09:07:27,171 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_SaveStateComplete
2007-11-05 09:07:27,171 [3448] Info UserControl - 控件生命周期--Page_Unload
2007-11-05 09:07:27,171 [3448] Info ASP.default_aspx - [首页+控件生命周期]--Page_Unload

  不知道大家看到问题了没有,为什么ClentCallBack的时候,Page.IsPostBack=true;???

你可能感兴趣的:(asp.net)