2 newbie usercontrol ?s (cacheing and nesting)

Discussion in 'ASP .Net Web Controls' started by darrel, Feb 5, 2004.

  1. darrel

    darrel Guest

    I'm easing my way into .NET by building some new templates for our web site
    using userControls. For now, they're mostly replacements for includes, but I
    hope to move towards a template engine at some point.

    Anyways, couple newbie questions:

    1) Cacheing.

    It appears that I can have .net cache a page by adding an OutputCache
    declaration:

    <%@ OutputCache Duration="600" VaryByParam="none" %>

    This seems like a good thing to add to the more static parts of our
    site...like the footer. How long should one cache something like that? Is
    there a rule? I assume a day would be good, but maybe 10 minutes is just as
    valid in terms of any real affect on the server. If you do cache it, will
    that cause headaches when I need to update it? For instance, if I set the
    cache to 1 day, would I need to wait an entire day to see any updates, or
    does .NET monitor the files and reset the cache once it's been changed?

    2) nesting.

    Can a UserControl import an ascx file that contains another user control? If
    not, can a UserControl import an ascx file that contains a plain-old
    include?

    Thanks!

    -Darrel
    darrel, Feb 5, 2004
    #1
    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. J'son
    Replies:
    0
    Views:
    369
    J'son
    Apr 12, 2005
  2. roy anderson

    Images not cacheing in 2.0?

    roy anderson, Jan 31, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    417
    roy anderson
    Feb 1, 2006
  3. Replies:
    3
    Views:
    861
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 19, 2006
  4. darrel

    Cacheing DB content

    darrel, May 30, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    687
    darrel
    May 30, 2006
  5. Trans
    Replies:
    10
    Views:
    294
    Sean O'Halpin
    Sep 16, 2005
Loading...

Share This Page