OutputCacheProfile.VaryByControl プロパティ

定義

VaryByControl プロパティを取得または設定します。

public:
 property System::String ^ VaryByControl { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByControl")]
public string VaryByControl { get; set; }
[<System.Configuration.ConfigurationProperty("varyByControl")>]
member this.VaryByControl : string with get, set
Public Property VaryByControl As String

プロパティ値

VaryByControl 値。

属性

次のコード例は、VaryByControl プロパティの使用方法を示しています。


// Get the current VaryByControl.
String varyByControlValue = 
    outputCacheProfile.VaryByControl;

// Set the VaryByControl.
outputCacheProfile.VaryByControl = 
    string.Empty;
  ' Get the current VaryByControl.
  Dim varyByControlValue As String = _
  outputCacheProfile.VaryByControl

  ' Set the VaryByControl.
  outputCacheProfile.VaryByControl = _
  String.Empty

注釈

VaryByControlは、キャッシュされるコントロールの ID のセミコロン区切りのセットです。

詳細については、「 複数バージョンのユーザー コントロール出力のキャッシュ」を参照してください。

注意

設定は VaryByControl 、 ディレクティブの 属性で VaryByControl 使用される設定 @ OutputCache と同じです。

適用対象

こちらもご覧ください