CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 6/17/2004 4:03:54 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 63 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
WhatThe12
Asp.Net User
Why is ProcessPostData called twice?6/17/2004 4:03:54 PM

0/0

The page life cycle calls 'Page.ProcessPostData' twice.

Why is this and what is '_leftoverPostData'?

Cheers, WT.
Web dev - spending forever achieving nothing.
joteke
Asp.Net User
Re: Why is ProcessPostData called twice?6/17/2004 4:42:30 PM

0/0

Hi,

it is called twice during the page life cycle, once before Page_Load and once after, just before postback events.

Reason is that it is first called for 'normal' controls before Page_Load to get controls to the 'ready' state, the state they were before postback, when Page_Load occurs, but then there has been left the chance that some controls are added to the Page only at Page_Load (some dynamical processing perhaps), and they need to load postback data also...therefore the postback data which has been left over from the first processing is processed by the controls added in Page_Load and this is the second call to ProcessPostData.

E.g at the second time it is called only for those postback processing controls which didn't do any processing in the first ProcessPostData call.


Thanks,

Teemu Keiski
Finland, EU
WhatThe12
Asp.Net User
Re: Why is ProcessPostData called twice?6/17/2004 6:32:22 PM

0/0

I see, so page load is the last opportunity to add controls if they're to get postback data automatically loaded into them.

When you add a control, it catches up with the page life cycle. I'd have thought that posback data could be loaded into the control during this catch up too. Apparently not.
Web dev - spending forever achieving nothing.
joteke
Asp.Net User
Re: Why is ProcessPostData called twice?6/17/2004 6:41:28 PM

0/0

Exactly. The catchup part is done by ControlCollection when you add a control dynamically...however postback data processing is done by the Page and it happens at fixed stages in the lifecycle. After the 2nd ProcessPostData, control would need to manually fetch the data from post collection.

If you need more details about the lifecycle:
http://weblogs.asp.net/eporter/archive/2003/07/15/10109.aspx
Thanks,

Teemu Keiski
Finland, EU
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
ProcessPostData ProcessPostData Second Try Fin_Assess is the actual page that loads. Contained within is a User Control called Class_List. ...
Begin ProcessPostData Second Try ??? - ASP.NET Forums Now to my question: What does "Begin ProcessPostData Second Try" mean. Is data being posted twice, and in case why ? ...
Code running and executing stored procedure twice For some reason your events are getting called twice. ... so the first time when ProcessPostData is fired, no dynamica controls will be acessible, ...
Software/Technology Discussion : Event catch-up in ASP.NET 2.0 ... Loading of post back data is in fact performed by the Page class in the ProcessPostData method, which is called twice by the ProcessRequestMain method ...
Timing 9 aspx.page Begin ProcessPostData Second Try 10 aspx.page End ProcessPostData ... the user must click the role they want to see TWICE! ...
When exactly does DropDownList.SelectedIndexChanged get triggered ... And can see that the SaveViewState() is being called twice (this is on ... ProcessPostData 0.000449 0.000041 aspx.page End ProcessPostData ...
RegisterRequiresPostback ... in the post collection get their ProcessPostData method called anyway these controlId's are removed from the array (so they do not get called twice). ...
JBlogs: The ASP.NET Page Object Model It is called twice! this.Load += new System.EventHandler(this. ... The ProcessPostData is a private method implemeted at Page class which contains code like ...
Page Events: Order and PostBack: ASP Alliance This method is recursively called on all children controls for each page ..... But the ProcessPostData comes along a returns it to its value from the post ...
The Technical Blog of Stefan Keir Gordon: ViewState: To be, or not ... Net will restore this value for you in the 'ProcessPostData' method, which occurs before AND after the OnLoad event. It happens twice, so that if you were ...




Search This Site:










prevent parent button event

inherits an radiobuttonlist

datagrid pageindexchanged event does not fire inside dynamically loaded user control

template controls problem

new web-site creation

problem with button_click in webpart

date picker control wanted with formatting

custom webcontrol - "error creating control" error in designview

custom control appears to interfere with viewstate

controls, here & ms site

create usercontrol at runtime, save it as file and load it. works??

free asp.net 2.0 ? i do not mind it being ad-supported

datagridcolumn collection editor

scrollable datagrid

no suitable method found to override !!!

validators within composite control

dynamically assign css link to a page

client side script and custom control

handling emails to domain

passing css to hosting page from server control?

deriving from treenode

a few problems with composite control. can you help?

framewrok 2.0 hosting

how to resize control in design time?

simple question regarding server controls and toolbox

content management problem

can help me how to solve my a little complex control???

style builder and properties

your oppinion on ultimahost!

custom servercontrol

  Privacy | Contact Us
All Times Are GMT