This documentation is archived and is not being maintained.

BasePartialCachingControl Class

Provides the base functionality for the StaticPartialCachingControl and the PartialCachingControl classes.

For a list of all members of this type, see BasePartialCachingControl Members.


[Visual Basic]
MustInherit Public Class BasePartialCachingControl
   Inherits Control
public abstract class BasePartialCachingControl : Control
public __gc __abstract class BasePartialCachingControl : public
public abstract class BasePartialCachingControl extends Control

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


[Visual Basic, C#] The following code example creates a reference to the BasePartialCachingControl class and sets it to the value of the Control.Parent property. The code then sets the Dependency property to a CacheDependency object that makes the control dependent on a text file.

[Visual Basic] 
Sub Page_Load(sender As [Object], ev As EventArgs)
   Dim c As BasePartialCachingControl = Parent 
      If Not (c Is Nothing) Then
      c.Dependency = New CacheDependency(MapPath("dep1.txt"))
   End If
End Sub 'Page_Load

void Page_Load(Object sender, EventArgs ev) {
    BasePartialCachingControl c = Parent as BasePartialCachingControl;
    if (c != null) {
        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.


Namespace: System.Web.UI

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

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

See Also

BasePartialCachingControl Members | System.Web.UI Namespace | Control | Caching Portions of an ASP.NET Page | @ OutputCache