Bizarre double-invokation of many methods for a @Registered User Control

E

Ezra Epstein

I've created a Trace user control to find out what's going on in the
request/response process. On a non-post back even it seems pretty
straight-forward:

Constructor
AddParsedSubObject()
AddedControl() (TraceLog)
OnInit()
TrackViewState()
OnLoad()
Page_Load()
EnsureChildControls()
CreateChildControls()
OnPreRender()
SaveViewState()
Render()
RenderChildren()

BUT, on post-back here's the call list:

AddParsedSubObject()
AddedControl() (TraceLog)
OnInit()
TrackViewState()
OnLoad()
Page_Load()
EnsureChildControls()
CreateChildControls()
OnPreRender()
SaveViewState()
Render()
RenderChildren()
OnLoad()
Page_Load()
EnsureChildControls()
OnPreRender()
SaveViewState()
Render()
RenderChildren()

The methods OnLoad() through RenderChildren() are called twice! Note that
since the Child controls have been created, EnsureChildControls() does not
invoke CreateChildControls() the second time.

Anyone able to explain this? Is it a bug?

Ezra E.
 
B

Bob

Only suggestions I can make are to verify that
AutoEventWireup is set to false, or you don't add any
new System.EventHandler() statements that duplicate
AutoEventWireup when true or HTML onEvent stuff.
 
E

Ezra Epstein

Thanks. Double-checked that and AutoEventWriteup="false" is explicitly
specified on the page.

?????

Ezra
 
E

Ezra Epstein

I've not heard anything back on this one.

Is anyone (MS ?) curious about this. Shall I post the code to the tracer
control (.ascx) it is trivial. Just throw it in a page and take a look at
what happens on post back.

Ezra e.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top