System.Web.UI.ControlCachePolicy.SetExpires Method

Instructs the System.Web.UI.BasePartialCachingControl control that wraps the user control to expire the cache entry at the specified date and time.

Syntax

public void SetExpires (DateTime expirationTime)

Parameters

expirationTime
A DateTime after which the cached entry expires.

Remarks

Use the ControlCachePolicy.SetExpires(DateTime) and ControlCachePolicy.SetSlidingExpiration(bool) methods (passing true) to instruct the System.Web.UI.BasePartialCachingControl control that wraps the user control to use a sliding expiration caching policy instead of an absolute expiration policy. Use the ControlCachePolicy.SetExpires(DateTime) method and the ControlCachePolicy.SetSlidingExpiration(bool) method (passing false) to specify an absolute expiration policy.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0