[lnkForumImage]
TotalShareware - Download Free Software

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


 

Sunil

1/21/2003 7:34:00 PM

Iam new to web development. Trying to use OutputCache directive in aspx
page.

<%@ OutputCache Duration="60" VaryByParam ="none" %>
Iam using headers and footers in all pages.
I was wondering if there is a way to cache headers and footers separately
from the page itself

Thanks





1 Answer

(Bassel Tabbara [MSFT])

1/21/2003 8:54:00 PM

0

Hello Sunil,
You can cache the header and footer by using fragment caching. Fragment
caching refers to the caching
of individual user controls (.ascx) within a Web Form. Each user control
can have independent cache durations
and implementations of how the caching behavior is to be applied. These
user controls can implement the
header and footer of your web forms. You can implement fragment caching by
using VaryByControl attribute of
the OutputCache directive. For example the line below shows how to use that
control:
<%@ OutputCache Duration="60" VaryByParam="none"
VaryByControl="MyRadioButtonList"%>
A sample on how to implement fragment caching can be found in the following
Kb article:

308378 HOW TO: Perform Fragment Caching in ASP.NET by Using Visual C# .NET
http://support.microsoft.com/...

308645 HOW TO: Perform Fragment Caching in ASP.NET by Using Visual Basic
.NET
http://support.microsoft.com/...

Caching Portions of an ASP.NET Page
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/c...
l/cpconcachingportionsofaspnetpage.asp

I hope this give you a jump start on fragment caching.
Thanks,
Bassel Tabbara
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.

-------------------
| From: "sunil" <sunil_godiyal@yahoo.com>
| Subject: caching headers and footers
| Date: Tue, 21 Jan 2003 12:34:29 -0600
| Lines: 14
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <OrsyAuXwCHA.2592@TK2MSFTNGP10>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| NNTP-Posting-Host: 216.201.153.58
| Path: cpmsftngxa08!cpmsftngxa06!TK2MSFTNGP08!TK2MSFTNGP10
| Xref: cpmsftngxa08
microsoft.public.dotnet.framework.aspnet.webcontrols:8697
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Iam new to web development. Trying to use OutputCache directive in aspx
| page.
|
| <%@ OutputCache Duration="60" VaryByParam ="none" %>
| Iam using headers and footers in all pages.
| I was wondering if there is a way to cache headers and footers separately
| from the page itself
|
| Thanks
|
|
|
|
|
|