WebPart.AllowConnect 属性


获取或设置一个值,该值指示 WebPart 控件是否允许其他控件与之形成连接。Gets or sets a value that indicates whether the WebPart control allows other controls to form connections with it.

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


指示是否可以与此控件形成连接的布尔值。A Boolean value that indicates whether connections can be formed with the control. 默认值为 trueThe default is true.



可以在页标记中以声明方式或以编程方式设置该属性值。The property value can be set declaratively in page markup, or programmatically.

无法通过主题或样式表主题设置此属性。This property cannot be set by themes or style sheet themes. 有关详细信息,请参阅 ThemeableAttributeASP.NET 主题和外观For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

此属性的个性化设置范围设置为 Shared,只能由授权用户修改。The personalization scope of this property is set to Shared and can be modified only by authorized users. 有关详细信息,请参阅 PersonalizableAttributeWeb 部件个性化概述For more information, see PersonalizableAttribute and Web Parts Personalization Overview.