callback going through more phases than expected

This post has 1 reply

Not Ranked
Posts: 1
prakashcomma Posted: Mon Sep 3, 2007 @ 5:36 AM
HI, I am basically playing with the "Rendering Content Through AJAX Callbacks" example. I also put a (bogus) user control onto the page (below the callback), but it has nothing to do with the callback, as such. In the user control's code-behind I overloaded OnPreRender, SaveViewState, etc. and give out via Debug.WriteLine whether it gets called. And to my surprise even if I just trigger the callback, OnPreRender, SaveViewState get called! Just "Render" is omited in comparison to a real postback.

I understood that the callback shouldn't touch the viewstate and shouldn't call PreRender? Why is it happening here anyway?

I am using VS2005sp1 with debug=true.
Top 25 Contributor
Posts: 336
sadat Posted: Wed Sep 5, 2007 @ 11:52 AM
Yes, the page life cycle executes as usual, in case the CallBack's response depends on other controls or something in code-behind. Only render is aborted and replaced with CallBack's response.
Page 1 of 1 (2 items)