control loading question...

Discussion in 'ASP .Net Web Controls' started by Ashish, Dec 18, 2003.

  1. Ashish

    Ashish Guest

    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
     
    Ashish, Dec 18, 2003
    #1
    1. Advertising

  2. Ashish

    Kelly Leahy Guest

    >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
     
    Kelly Leahy, Dec 18, 2003
    #2
    1. Advertising

  3. Ashish

    Ashish Guest

    Kelly Leahy wrote:

    >>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

    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
     
    Ashish, Dec 18, 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. =?Utf-8?B?Y2luZHk=?=
    Replies:
    2
    Views:
    2,597
    Steven Cheng[MSFT]
    Jun 8, 2005
  2. David Segall
    Replies:
    2
    Views:
    451
    Thomas Kellerer
    Jan 2, 2007
  3. Replies:
    4
    Views:
    325
  4. edfialk
    Replies:
    0
    Views:
    194
    edfialk
    May 10, 2007
  5. ofir
    Replies:
    0
    Views:
    190
Loading...

Share This Page