[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

2 newbie usercontrol ?s (cacheing and nesting

notreal

2/5/2004 4:12:00 PM

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