Execution order of PageLoad for user controls

Discussion in 'ASP .Net' started by =?Utf-8?B?QmlsbCBCb3Jn?=, Mar 6, 2004.

  1. 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
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Mar 6, 2004
    #1
    1. Advertisements

  2. =?Utf-8?B?QmlsbCBCb3Jn?=

    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

    "Bill Borg" <> wrote in message
    news:...
    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. This helps a lot, thanks.
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Mar 6, 2004
    #3
    1. Advertisements

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. priya
    Replies:
    0
    Views:
    1,419
    priya
    Oct 3, 2005
  2. Philip Townsend

    user controls and event order

    Philip Townsend, Oct 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    413
    Philip Townsend
    Oct 16, 2003
  3. Bijoy Naick

    Execution order of Validation Controls

    Bijoy Naick, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,155
    Martin Marinov
    Jun 8, 2004
  4. John Saunders

    Re: A question about order of execution?

    John Saunders, Jul 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    497
    S. Justin Gengo
    Jul 15, 2004
  5. Phil Johnson

    User Control PageLoad even not firing

    Phil Johnson, Jan 31, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    625
    Phil Johnson
    Jan 31, 2008
  6. Faizan Ahmed
    Replies:
    1
    Views:
    494
    John Saunders
    Jan 4, 2005
  7. John Hyland

    Control the order user controls load?

    John Hyland, Oct 25, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    194
    Steve C. Orr [MVP, MCSD]
    Oct 25, 2004
  8. Faizan Ahmed
    Replies:
    1
    Views:
    522
    John Saunders
    Jan 4, 2005
Loading...