Share via


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是要快取之控制項的分號分隔識別碼集。

如需詳細資訊,請參閱 快取多個版本的使用者控制輸出

注意

這些 VaryByControl 設定與 指示詞的 @ OutputCache 屬性所使用的 VaryByControl 設定相同。

適用於

另請參閱