出力キャッシュがユーザー コントロールを変更するために使用するユーザー コントロール プロパティのリストを取得します。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public ReadOnly Property VaryByControls As String
'使用
Dim instance As PartialCachingAttribute
Dim value As String
value = instance.VaryByControls
public string VaryByControls { get; }
public:
property String^ VaryByControls {
String^ get ();
}
/** @property */
public String get_VaryByControls ()
public function get VaryByControls () : String
適用できません。
プロパティ値
ユーザー コントロール プロパティのリスト。
使用例
PartialCachingAttribute(Int32,String,String,String) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。この例では、このコンストラクタを使用して、ユーザー コントロールをキャッシュできることを示し、キャッシュの存続期間を 20 秒に指定して、ユーザー コントロールの出力の変化の対象となる state
という名前のコントロールを指定しています。
' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByControls
' property to the ID of the server control to vary the output by.
' In this case, it is state, the ID assigned to a DropDownList
' server control.
<PartialCaching(20, Nothing, "state", Nothing)> _
Public Class ctlSelect
Inherits UserControl
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByControls
// property to the ID of the server control to vary the output by.
// In this case, it is state, the ID assigned to a DropDownList
// server control.
[PartialCaching(20, null, "state", null)]
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByControls
// property to the ID of the server control to vary the output by.
// In this case, it is state, the ID assigned to a DropDownList
// server control.
/** @attribute PartialCaching(20, null, "state", null)
*/
プラットフォーム
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 名前空間