Execution order of PageLoad for user controls

Discussion in 'ASP .Net' started by Guest, Mar 6, 2004.

  1. Guest

    Guest Guest

    Hello all

    I am trying to understand the execution order of the PageLoad routines in two different user controls on the same page. In particular, I need one to execute before the other, but I can't seem to change the order. It doesn't appear to depend on the order in which they are registered on the page. Any thoughts

    Thanks

    Bill Borg
     
    Guest, Mar 6, 2004
    #1
    1. Advertisements

  2. Guest

    Teemu Keiski Guest

    Hi,

    basically you can't rely on order of the events. You make things sure by
    calling custom methods (which do the task you now have in event handlers) of
    the user controls in order, say in Page's Load event handler.

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist

    Hello all,

    I am trying to understand the execution order of the PageLoad routines in
    two different user controls on the same page. In particular, I need one to
    execute before the other, but I can't seem to change the order. It doesn't
    appear to depend on the order in which they are registered on the page. Any
    thoughts?

    Thanks,

    Bill Borg
     
    Teemu Keiski, Mar 6, 2004
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    This helps a lot, thanks.
     
    Guest, Mar 6, 2004
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.