次の方法で共有


PartialCachingAttribute.VaryByParams プロパティ

出力キャッシュがユーザー コントロールを変更するために使用する、クエリ文字列のリストまたはフォームの POST パラメータのリストを取得します。

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

構文

'宣言
Public ReadOnly Property VaryByParams As String
'使用
Dim instance As PartialCachingAttribute
Dim value As String

value = instance.VaryByParams
public string VaryByParams { get; }
public:
property String^ VaryByParams {
    String^ get ();
}
/** @property */
public String get_VaryByParams ()
public function get VaryByParams () : String
適用できません。

プロパティ値

クエリ文字列のリストまたはフォームの POST パラメータのリスト。

使用例

PartialCachingAttribute(Int32,String,String,String) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。この例では、このコンストラクタを使用して、ユーザー コントロールをキャッシュできることを示し、キャッシュ エントリが依存するパラメータを指定しています。

' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByParams
' property to ctlSelect.country, the full name of the form 
' POST parameter generated by the country DropDownList control.
<PartialCaching(20, "ctlSelect.country", Nothing, Nothing)> _
Public Class ctlSelect
    Inherits UserControl
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByParams
// property to ctlSelect.country, the full name of the form 
// POST parameter generated by the country DropDownList control.
[PartialCaching(20, "ctlSelect.country", null, null)]
public partial class ctlSelect : UserControl
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByParams
// property to ctlSelect.country, the full name of the form 
// POST parameter generated by the country DropDownList control.
/** @attribute PartialCaching(20, "ctlSelect.country", null, 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 名前空間