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.

Exception Condition

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
Available since 2.0
Return to top