Order of controls loaded

Discussion in 'ASP .Net Web Controls' started by et, Feb 6, 2005.

  1. et

    et Guest

    What dictates the order of user controls loaded? If I have 3 user controls
    on my default page, for instance, say a header control, menu control, and
    details control.

    Why is it ALWAYS that the menu control is loaded last, so that the details
    page is not loaded according to the menu item selected. Why is this
    backward. Do I need to name them something special, or trick ti somehow so
    that it doesn't know it's a menu control? I know this sounds silly, but no
    matter what I do, the controls are not loaded in the order I need them.
     
    et, Feb 6, 2005
    #1
    1. Advertising

  2. You should consider putting your control-dependent code in the PreRender
    event instead of the Load event.
    The PreRender event happens after all controls have been loaded, therefore
    you'll have a more reliable state to work with.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "et" <> wrote in message
    news:uuI5RS$...
    > What dictates the order of user controls loaded? If I have 3 user
    > controls on my default page, for instance, say a header control, menu
    > control, and details control.
    >
    > Why is it ALWAYS that the menu control is loaded last, so that the details
    > page is not loaded according to the menu item selected. Why is this
    > backward. Do I need to name them something special, or trick ti somehow
    > so that it doesn't know it's a menu control? I know this sounds silly,
    > but no matter what I do, the controls are not loaded in the order I need
    > them.
    >
     
    Steve C. Orr [MVP, MCSD], Feb 6, 2005
    #2
    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. Marcelo Birnbach [MS]
    Replies:
    0
    Views:
    3,330
    Marcelo Birnbach [MS]
    Jun 28, 2003
  2. =?Utf-8?B?V291dGVy?=

    Dynamically Loaded controls loading other controls

    =?Utf-8?B?V291dGVy?=, Feb 27, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    501
    =?Utf-8?B?V291dGVy?=
    Feb 27, 2006
  3. Udo Corban
    Replies:
    0
    Views:
    3,855
    Udo Corban
    Jan 23, 2004
  4. Soren Kuula
    Replies:
    2
    Views:
    504
    Soren Kuula
    Feb 1, 2004
  5. Stephan Kämper
    Replies:
    2
    Views:
    240
    Stephan Kämper
    Jan 18, 2004
Loading...

Share This Page