control loading question...

A

Ashish

hi all,
according to my understanding ( and i may be wrong ) a control is loaded
as a seperate assembly when a page is loaded, and the control is loaded
when loader sees the <% @register %> tag,
my sitiuation is that i want to reduce the number of assemblies loaded
per page to improve performance and resource usage, and the pages are
highly dynamic and configurable in nature i.e a control might not be
there on the page at all
the way iam handling is by setting the visible property

i wanna know if it is possible to use loadcontrol without using <%
@register %> tag, and would it save me from some object creation per page ?

any help or thoughts would be appreciated

TIA
-ashish
 
K

Kelly Leahy

i wanna know if it is possible to use loadcontrol
without using <%
@register %> tag, and would it save me from some object
creation per page ?

It seems to me that you can, as long as you don't need
strong typing of the controls. You could, for instance,
if your controls act similarly, make a single interface
that you use to get to the common properties, and then
implement that interface on all of your controls, so that
when loading them dynamically, you don't need to import
the assemblies at compile time (since the interface would
presumably be declared in some common assembly referenced
by all of the controls).

Kelly Leahy
 
A

Ashish

Kelly said:
without using <%


creation per page ?

It seems to me that you can, as long as you don't need
strong typing of the controls. You could, for instance,
if your controls act similarly, make a single interface
that you use to get to the common properties, and then
implement that interface on all of your controls, so that
when loading them dynamically, you don't need to import
the assemblies at compile time (since the interface would
presumably be declared in some common assembly referenced
by all of the controls).

Kelly Leahy
hey thanks kelly,
i was also wondering if you cold provide some inside into if this would
provide some performance and resource benefits,
right now if i see the aspnet_wp dumo , i see a lot of controls there
which i can really do without in the app, if i dynamically load em,

do you think it saves memory and reduces load time, or would the loader
load it just by seeing <@reference > directive

TIA
-ashish
 

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top