Export (0) Print
Expand All

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.

System.Object
   System.Web.UI.Control
      System.Web.UI.BasePartialCachingControl
         System.Web.UI.PartialCachingControl
         System.Web.UI.StaticPartialCachingControl

[Visual Basic]
MustInherit Public Class BasePartialCachingControl
   Inherits Control
[C#]
public abstract class BasePartialCachingControl : Control
[C++]
public __gc __abstract class BasePartialCachingControl : public
   Control
[JScript]
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.

Example

[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

[C#] 
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.

Requirements

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

Show:
© 2014 Microsoft