UserControl.CachePolicy Property
.NET Framework 2.0
Gets a reference to a collection of caching parameters for this user control.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
/** @property */ public ControlCachePolicy get_CachePolicy ()
public function get CachePolicy () : ControlCachePolicy
Not applicable.
Property Value
A ControlCachePolicy containing properties that define the caching parameters for this UserControl.The CachePolicy property defines the cache parameters for the instance of the UserControl class. The CachePolicy property is read-only; however, you can set the properties of the ControlCachePolicy object that it returns.
The CachePolicy property can not be set declaratively. It must be set programmatically.
The following code example demonstrates how to use the SupportsCaching property to determine whether the user control can be cached, and if so, sets the Duration property to cache the control for 10 seconds.
Community Additions
ADD
Show: