Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > LoadControl performance

Reply
Thread Tools

LoadControl performance

 
 
Thor W Hammer
Guest
Posts: n/a
 
      08-13-2003
How is LoadControl's performance compared to adding a control directly on
the WebForm designer?

TWH


 
Reply With Quote
 
 
 
 
Thor W Hammer
Guest
Posts: n/a
 
      08-13-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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$(E-Mail Removed).. .
> > How is LoadControl's performance compared to adding a control directly

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

>
>



 
Reply With Quote
 
 
 
 
Anders Borum
Guest
Posts: n/a
 
      08-22-2003
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
--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LoadControl performance Thor W Hammer ASP .Net 2 08-22-2003 08:12 PM
LoadControl performance Thor W Hammer ASP .Net Web Controls 2 08-22-2003 08:12 PM
LoadControl VirtualPath question George Durzi ASP .Net 0 07-31-2003 05:14 PM
Need help with LoadControl Kurt ASP .Net 5 07-03-2003 05:38 AM
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack huobazi ASP .Net 1 07-03-2003 03:14 AM



Advertisments