Export (0) Print
Expand All

BasePartialCachingControl.Dependency Property

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

[Visual Basic]
Public Property Dependency As CacheDependency
[C#]
public CacheDependency Dependency {get; set;}
[C++]
public: __property CacheDependency* get_Dependency();
public: __property void set_Dependency(CacheDependency*);
[JScript]
public function get Dependency() : CacheDependency;
public function set Dependency(CacheDependency);

Property Value

The CacheDependency instance associated with the server control.

Remarks

This property allows you to remove user control output from the output cache when a file or key dependency changes.

Example

[Visual Basic, C#] The following code example sets the Dependency property to a CacheDependency object that makes the control dependent on a text file. This example is part of a larger example provided for the BasePartialCachingControl class.

[Visual Basic] 
c.Dependency = New CacheDependency(MapPath("dep1.txt"))

[C#] 
c.Dependency = new CacheDependency(MapPath("dep1.txt"));

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

BasePartialCachingControl Class | BasePartialCachingControl Members | System.Web.UI Namespace

Show:
© 2015 Microsoft