Export (0) Print
Expand All

PartialCachingAttribute.PartialCachingAttribute(Int32) Constructor

Initializes a new instance of the PartialCachingAttribute class with the specified duration assigned to the user control to be cached.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public PartialCachingAttribute (
	int duration
)
public PartialCachingAttribute (
	int duration
)
public function PartialCachingAttribute (
	duration : int
)
Not applicable.

Parameters

duration

The amount of time, in seconds, a user control is to remain in the output cache.

The following code example demonstrates how the PartialCachingAttribute(Int32) constructor can be applied to a user control. In the example, the constructor is used to indicate that the user control can be cached and to specify the caching duration. This code example is part of a larger example provided for the PartialCachingAttribute class.

// Set the PartialCachingAttribute.Duration property to 20 seconds.
[PartialCaching(20)]
public partial class ctlMine : UserControl

// Set the PartialCachingAttribute.Duration property to 20 seconds.
/** @attribute PartialCaching(20)
 */

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft