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

Discussion in 'ASP .Net Web Controls' started by Ezra Epstein, Sep 16, 2003.

  1. Ezra Epstein

    Ezra Epstein Guest

    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.
    Ezra Epstein, Sep 16, 2003
    #1
    1. Advertising

  2. Ezra Epstein

    Bob Guest

    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.


    >-----Original Message-----
    >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.
    >
    >
    >.
    >
    Bob, Sep 16, 2003
    #2
    1. Advertising

  3. Ezra Epstein

    Ezra Epstein Guest

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

    ?????

    Ezra

    "Bob" <> wrote in message
    news:03f301c37c82$1bc27f70$...
    > 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.
    >
    >
    > >-----Original Message-----
    > >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.
    > >
    > >
    > >.
    > >
    Ezra Epstein, Sep 16, 2003
    #3
  4. Ezra Epstein

    Ezra Epstein Guest

    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.

    "Ezra Epstein" <eepstein at prajna.com> wrote in message
    news:...
    > Thanks. Double-checked that and AutoEventWriteup="false" is explicitly
    > specified on the page.
    >
    > ?????
    >
    > Ezra
    >
    > "Bob" <> wrote in message
    > news:03f301c37c82$1bc27f70$...
    > > 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.
    > >
    > >
    > > >-----Original Message-----
    > > >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.
    > > >
    > > >
    > > >.
    > > >

    >
    >
    Ezra Epstein, Sep 23, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hf
    Replies:
    0
    Views:
    510
  2. Sydex
    Replies:
    12
    Views:
    6,483
    Victor Bazarov
    Feb 17, 2005
  3. Alex Genkin

    ver 23 invokation on Windows

    Alex Genkin, Dec 1, 2004, in forum: Python
    Replies:
    1
    Views:
    262
    Tim Roberts
    Dec 1, 2004
  4. Replies:
    0
    Views:
    464
  5. Replies:
    0
    Views:
    423
Loading...

Share This Page