LoadControl performance

Discussion in 'ASP .Net Building Controls' started by Thor W Hammer, Aug 13, 2003.

  1. How is LoadControl's performance compared to adding a control directly on
    the WebForm designer?

    TWH
    Thor W Hammer, Aug 13, 2003
    #1
    1. Advertising

  2. Thanks,

    In my case I was not going to place my control (control_2) on a form but
    rather inside another control_1. I found that a simple way to do this is to
    pass the name of control_2 through a property on control_1. I just wonder if
    this will be more (run)time consuming than creating a Panel like control
    (control_1), where I place the control_2 into control_1's designer. The last
    solution, I think is much more (design)time consuming.

    "Marina" <> wrote in message
    news:...
    > I can't say for sure, but I would imagine the difference is negligible.
    >
    > However, if you are certain you will have a user control on the page, you
    > might as well put it on at design time. This helps keep the code and UI
    > separate.
    >
    > Sometimes though, you may need to load controls based on certain criteria,
    > in which case LoadControl comes in handy.
    >
    > "Thor W Hammer" <thorwhammer - NO @ SPAM - hotmail.com> wrote in message
    > news:3f3a3e8f$0$251$...
    > > How is LoadControl's performance compared to adding a control directly

    on
    > > the WebForm designer?
    > >
    > > TWH
    > >
    > >

    >
    >
    Thor W Hammer, Aug 13, 2003
    #2
    1. Advertising

  3. Thor W Hammer

    Anders Borum Guest

    Hello!

    With caching and 3Ghz CPUs available, I'm sure there's very little
    difference between the two methods. Obviously placing the control on a page
    at designtime writes the control to the compiled source for the page, but
    don't forget that the loaded template will be compiled as well (and
    subsequently retrieved from the assembly cache).

    I wouldn't worry at all. In fact, I don't. I've built a massive modular
    framework (hierarchical compositions of controls) that are create the
    controls hierarchy dynamically from a db structure at runtime and we're
    getting a 25ms response with pretty complex hierarchies - 15 to 25
    controls - most of them are nested).

    --
    venlig hilsen / with regards
    anders borum
    --
    Anders Borum, Aug 22, 2003
    #3
    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. Kurt

    Need help with LoadControl

    Kurt, Jul 1, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    437
    Natty Gur
    Jul 3, 2003
  2. huobazi
    Replies:
    1
    Views:
    681
    David Waz...
    Jul 3, 2003
  3. George Durzi

    LoadControl VirtualPath question

    George Durzi, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    474
    George Durzi
    Jul 31, 2003
  4. Thor W Hammer

    LoadControl performance

    Thor W Hammer, Aug 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,071
    Anders Borum
    Aug 22, 2003
  5. Thor W Hammer

    LoadControl performance

    Thor W Hammer, Aug 13, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    117
    Anders Borum
    Aug 22, 2003
Loading...

Share This Page