PartialCachingAttribute.Shared 属性

定义

获取一个值,该值指示是否可以与多个页面共享用户控件输出。

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

属性值

true 如果用户可以在多个页面之间共享用户控制输出,则为否则,为 false. 默认值为 false

注解

如果将此属性设置为该属性 true,则多个 Web 窗体页可以访问缓存的用户控件输出。 如果未将其 true设置为,则默认行为是缓存包含该用户控件的每个页面的一个版本的用户控件输出。 可以通过启用此属性来节省大量内存。

适用于