次の方法で共有


OutputCacheProfile.VaryByCustom プロパティ

定義

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

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

プロパティ値

String

VaryByCustom 値。

属性

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


// Get the current VaryByCustom.
String varyByCustomValue = 
    outputCacheProfile.VaryByCustom;

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

  ' Set the VaryByCustom property.
  outputCacheProfile.VaryByCustom = _
  String.Empty

注釈

カスタム VaryByCustom 出力キャッシュの要件を表す任意のテキストを指定できます。 カスタム文字列を入力する場合は、アプリケーションの GetVaryByCustomString Global.asax ファイル内のメソッドをオーバーライドする必要があります。

注意

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

適用対象

こちらもご覧ください