OutputCacheProfile.VaryByControl 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 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。
有关详细信息,请参阅 缓存多个版本的用户控制输出。
注释
这些VaryByControl设置与指令的属性VaryByControl使用的@ OutputCache设置相同。