Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ControlCachePolicy.Dependency Property

Gets or sets an instance of the CacheDependency class associated with the cached user control output.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public CacheDependency Dependency { get; set; }

Property Value

Type: System.Web.Caching.CacheDependency
The CacheDependency associated with the control. The default is null.


The user control is not associated with a BasePartialCachingControl and is not cacheable.

- or -

The Dependency property is set outside of the initialization and rendering stages of the control.

The Dependency property delegates to the Dependency property of the BasePartialCachingControl control that wraps the user control. When the CacheDependency instance is invalidated, the user control is removed from the cache.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft