ControlCachePolicy.VaryByControl 属性

定义

获取或设置控件标识符列表,以改变缓存的输出。

public:
 property System::String ^ VaryByControl { System::String ^ get(); void set(System::String ^ value); };
public string VaryByControl { get; set; }
member this.VaryByControl : string with get, set
Public Property VaryByControl As String

属性值

用于改变用户控件输出缓存的字符串的分号分隔列表。 这些字符串表示在用户控件中声明 ASP.NET 服务器控件的 ID 属性值。

例外

用户控件不与 a BasePartialCachingControl 关联且不可缓存。

-或-

VaryByControl 属性在控件的初始化和呈现阶段之外设置。

适用于

另请参阅