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.
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.