OutputCacheProfile.VaryByCustom 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定該 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
屬性值
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 是任何代表自訂輸出快取需求的文字。 如果輸入自訂字串,必須在應用程式的 Global.asax 檔案中覆寫該 GetVaryByCustomString 方法。
Note
設定VaryByCustom與指令屬性所使用的VaryByCustom@ OutputCache相同。