語言

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,需快取。

欲了解更多資訊,請參閱「 快取多版本使用者控制輸出」。

Note

設定VaryByControl與指令屬性所使用的VaryByControl@ OutputCache相同。

適用於

另請參閱