ASP.NET 后台处理数据的顺序

private void ProcessRequestMain()
            {
            try
            {
            if (this.IsInAspCompatMode)
            {
            AspCompatApplicationStep.OnPageStartSessionObjects();
            }
            this._requestValueCollection = this.DeterminePostBackMode();
            HttpContext context = this.Context;
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "Begin Init");
            }
            base.InitRecursive(null);
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End Init");
            }
            if (this.IsPostBack)
            {
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "Begin LoadViewState");
            }
            this.LoadPageViewState();
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End LoadViewState");
            this.Trace.Write("aspx.page", "Begin ProcessPostData");
            }
            this.ProcessPostData(this._requestValueCollection, true);
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End ProcessPostData");
            }
            }
            base.LoadRecursive();
            if (this.IsPostBack)
            {
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "Begin ProcessPostData Second Try");
            }
            this.ProcessPostData(this._leftoverPostData, false);
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End ProcessPostData Second Try");
            this.Trace.Write("aspx.page", "Begin Raise ChangedEvents");
            }
            this.RaiseChangedEvents();
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End Raise ChangedEvents");
            this.Trace.Write("aspx.page", "Begin Raise PostBackEvent");
            }
            this.RaisePostBackEvent(this._requestValueCollection);
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End Raise PostBackEvent");
            }
            }
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "Begin PreRender");
            }
            base.PreRenderRecursiveInternal();
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End PreRender");
            base.BuildProfileTree("ROOT", this.EnableViewState);
            this.Trace.Write("aspx.page", "Begin SaveViewState");
            }
            this.SavePageViewState();
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End SaveViewState");
            this.Trace.Write("aspx.page", "Begin Render");
            }
            base.RenderControl(this.CreateHtmlTextWriter(this.Response.Output));
            if (context.TraceIsEnabled)
            {
            this.Trace.Write("aspx.page", "End Render");
            }
            }
            catch (ThreadAbortException)
            {
            base.UnloadRecursive(true);
            }
            catch (ConfigurationException)
            {
            throw;
            }
            catch (Exception exception)
            {
            PerfCounters.IncrementCounter(AppPerfCounter.ERRORS_DURING_REQUEST);
            PerfCounters.IncrementCounter(AppPerfCounter.ERRORS_TOTAL);
            if (!this.HandleError(exception))
            {
            throw;
            }
            }
            }
            

            
posted on 2007-05-26 18:11  西湖浪子  阅读(179)  评论(0)    收藏  举报