キャッシュされたアイテムが出力キャッシュ内に存続する時間 (秒数) を取得します。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public ReadOnly Property Duration As Integer
'使用
Dim instance As PartialCachingAttribute
Dim value As Integer
value = instance.Duration
public int Duration { get; }
public:
property int Duration {
int get ();
}
/** @property */
public int get_Duration ()
public function get Duration () : int
適用できません。
プロパティ値
ユーザー コントロールを出力キャッシュに残しておく時間 (秒数)。
使用例
PartialCachingAttribute(Int32) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。属性によって、ユーザー コントロールをキャッシュできることを示し、キャッシュの存続期間を 20 秒に設定しています。このコード例は、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 名前空間