次の方法で共有


PartialCachingAttribute コンストラクタ (Int32)

キャッシュされるユーザー コントロールに割り当てる存続期間を指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)

構文

'宣言
Public Sub New ( _
    duration As Integer _
)
'使用
Dim duration As Integer

Dim instance As New PartialCachingAttribute(duration)
public PartialCachingAttribute (
    int duration
)
public:
PartialCachingAttribute (
    int duration
)
public PartialCachingAttribute (
    int duration
)
public function PartialCachingAttribute (
    duration : int
)
適用できません。

パラメータ

  • duration
    ユーザー コントロールを出力キャッシュに残しておく時間 (秒数)。

使用例

PartialCachingAttribute(Int32) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。この例では、このコンストラクタを使用して、ユーザー コントロールをキャッシュできることを示し、キャッシュの存続期間を指定しています。このコード例は、PartialCachingAttribute クラスのトピックで取り上げているコード例の一部分です。

' Set the PartialCachingAttribute.Duration property to 20 seconds.
<PartialCaching(20)> _
Partial Class ctlMine
    Inherits UserControl
// 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 CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間