.NET Framework 類別庫
OutputCacheParameters.VaryByCustom 屬性

注意:這個屬性是 .NET Framework 2.0 版的新功能。

取得輸出快取用來變更快取項目的自訂字串清單。

命名空間: System.Web.UI
組件: System.Web (在 system.web.dll 中)

語法

Visual Basic (宣告)
Public Property VaryByCustom As String
Visual Basic (使用方式)
Dim instance As OutputCacheParameters
Dim value As String

value = instance.VaryByCustom

instance.VaryByCustom = value
C#
public string VaryByCustom { get; set; }
C++
public:
property String^ VaryByCustom {
    String^ get ();
    void set (String^ value);
}
J#
/** @property */
public String get_VaryByCustom ()

/** @property */
public void set_VaryByCustom (String value)
JScript
public function get VaryByCustom () : String

public function set VaryByCustom (value : String)

屬性值

自訂字串的清單。
備註

如果您為這個屬性指定 "browser",快取項目將根據瀏覽器類型和主要版本號碼而不同。如果自訂字串已輸入,則您必須在您應用程式的 Global.asax 檔中覆寫 HttpApplication.GetVaryByCustomString 方法。

平台

Windows 98、 Windows 2000 SP4、 Windows Server 2003、 Windows XP Media Center Edition、 Windows XP Professional x64 Edition、 Windows XP SP2、 Windows XP Starter Edition

.NET Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱系統需求一節的內容。

版本資訊

.NET Framework

支援版本:2.0
請參閱

標記 :


Page view tracker