Assembly: System.Web (in system.web.dll)
'Declaration Public MustInherit Class BasePartialCachingControl Inherits Control 'Usage Dim instance As BasePartialCachingControl
The BasePartialCachingControl class represents a user control that has output caching enabled in programmatic scenarios. ASP.NET provides several ways to enable output caching for a control. The following list describes methods you can use to enable output caching:
Use the @ OutputCache directive to enable output caching in declarative scenarios.
Use the PartialCachingAttribute class to enable caching for a user control in a code-behind file.
Use the ControlCachePolicy class to specify cache settings in programmatic scenarios in which you are working with BasePartialCachingControl instances.
The following code example demonstrates how to create a reference to the BasePartialCachingControl class and sets it to the value of the Parent property. The code then sets the Dependency property to a CacheDependency object that makes the control dependent on a text file.