tags:

views:

23

answers:

2

Hello,

I have aspx page with a user control. I want to implement caching for the entire page except the user control. Please any help to implement this.

Thanks,

Pradeep

+1  A: 

There is a control callen Substitution which displays dynamic data on location in a cached page. However the data is retrieved from a function contained in the page code behind not a user control.

An alternate solution would be do to the following:

Split your page in sections. Each section is represented by a user control.

The sections which must be cached have the output cache of their control enabled. The ones that need to be dynamic not.

You could get something like this:

<body>
<app:CachedSection />
<app:CachedSection />
<app:DynamicSection />
<app:CachedSection />
</body>
diamandiev
A: 

Scott Guthrie has a great article about ASP.NET's Substitution features (aka Donut Caching):

http://weblogs.asp.net/scottgu/archive/2006/11/28/tip-trick-implement-donut-caching-with-the-asp-net-2-0-output-cache-substitution-feature.aspx

Bryan Watts