ControlCachePolicy.SetVaryByCustom(String) メソッド

定義

出力キャッシュがユーザー コントロールを変更するために使用するカスタム文字列の一覧を設定します。

public:
 void SetVaryByCustom(System::String ^ varyByCustom);
public void SetVaryByCustom(string varyByCustom);
member this.SetVaryByCustom : string -> unit
Public Sub SetVaryByCustom (varyByCustom As String)

パラメーター

varyByCustom
String

カスタム文字列の一覧。

例外

ユーザー コントロールは BasePartialCachingControl に関連付けられていないので、キャッシュできません。

注釈

varyByCustom パラメーターとして "browser" を渡すと、ユーザー コントロールはブラウザーの種類とメジャー バージョン番号によって異なります。 別のカスタム文字列を入力する場合は、アプリケーションの Global.asax ファイルの GetVaryByCustomString メソッドをオーバーライドする必要があります。

適用対象

こちらもご覧ください