Provides the base functionality for the StaticPartialCachingControl and PartialCachingControl classes.
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _ <AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _ Public MustInherit Class BasePartialCachingControl _ Inherits Control
Dim instance As BasePartialCachingControl
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] public abstract class BasePartialCachingControl : Control
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class BasePartialCachingControl abstract : public Control
public abstract class BasePartialCachingControl extends Control
<asp:BasePartialCachingControl />
The BasePartialCachingControl class represents a user control that has output caching enabled in programmatic scenarios. ASP.NET provides several ways to enable output caching for a control. The following list describes methods you can use to enable output caching:
Use the @ OutputCache directive to enable output caching in declarative scenarios.
Use the PartialCachingAttribute class to enable caching for a user control in a code-behind file.
Use the ControlCachePolicy class to specify cache settings in programmatic scenarios in which you are working with BasePartialCachingControl instances.
The following code example demonstrates how to create a reference to the BasePartialCachingControl class and sets it to the value of the Parent property. The code then sets the Dependency property to a CacheDependency object that makes the control dependent on a text file.
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")); } }
For operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
For operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98