ControlCachePolicy.Cached 属性

定义

获取或设置一个值,该值指示是否为用户控件启用片段缓存。

public:
 property bool Cached { bool get(); void set(bool value); };
public bool Cached { get; set; }
member this.Cached : bool with get, set
Public Property Cached As Boolean

属性值

true 如果缓存了用户控件的输出,则为 ;否则,为 false.

例外

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

-或-

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

适用于