PartialCachingAttribute.VaryByParams プロパティ

定義

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

public:
 property System::String ^ VaryByParams { System::String ^ get(); };
public:
 property System::String ^ VaryByParams { System::String ^ get(); void set(System::String ^ value); };
public string VaryByParams { get; }
public string VaryByParams { get; set; }
member this.VaryByParams : string
member this.VaryByParams : string with get, set
Public ReadOnly Property VaryByParams As String
Public Property VaryByParams As 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", 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.
<PartialCaching(20, "ctlSelect.country", Nothing, Nothing)> _
Public Class ctlSelect
    Inherits UserControl

適用対象