../images/Emo26.gif
לא. זמן יצירת הפקדים היא לא חלק ממחזור החיים של דף, היא משהו שהכרח שיש דברים שקורים קודם ויש דברים שקורים אחר-כך. זוהי שיטת העבודה המקובלת והמומלץ ע"י מיקרוסופט. מחזור החיים של דף מוגדר כחלק מרצף אירועים ספציפי מאוד: (מתוך ProcessRequestMain בתוך הפריימוורק)
if (this.MaintainScrollPositionOnPostBack) { this.LoadScrollPosition(); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin PreInit"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_PRE_INIT_ENTER, this._context.WorkerRequest); } this.PerformPreInit(); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_PRE_INIT_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End PreInit"); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin Init"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_INIT_ENTER, this._context.WorkerRequest); } this.InitRecursive(null); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_INIT_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End Init"); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin InitComplete"); } this.OnInitComplete(EventArgs.Empty); if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End InitComplete"); } if (this.IsPostBack) { if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin LoadState"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_VIEWSTATE_ENTER, this._context.WorkerRequest); } this.LoadAllState(); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_VIEWSTATE_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End LoadState"); this.Trace.Write("aspx.page", "Begin ProcessPostData"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_POSTDATA_ENTER, this._context.WorkerRequest); } this.ProcessPostData(this._requestValueCollection, true); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_POSTDATA_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End ProcessPostData"); } } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin PreLoad"); } this.OnPreLoad(EventArgs.Empty); if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End PreLoad"); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin Load"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_ENTER, this._context.WorkerRequest); } this.LoadRecursive(); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_LOAD_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End Load"); } if (this.IsPostBack) { if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "Begin ProcessPostData Second Try"); } this.ProcessPostData(this._leftoverPostData, false); if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End ProcessPostData Second Try"); this.Trace.Write("aspx.page", "Begin Raise ChangedEvents"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_POST_DATA_CHANGED_ENTER, this._context.WorkerRequest); } this.RaiseChangedEvents(); if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_POST_DATA_CHANGED_LEAVE, this._context.WorkerRequest); } if (context1.TraceIsEnabled) { this.Trace.Write("aspx.page", "End Raise ChangedEvents"); this.Trace.Write("aspx.page", "Begin Raise PostBackEvent"); } if (EtwTrace.IsTraceEnabled(5, 4)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PAGE_RAISE_POSTBACK_ENTER, this._context.WorkerRequest); } // next page in next message