Export (0) Print
Expand All
Expand Minimize

WebPart.IsVisible Property

Windows SharePoint Services 3

NOTE: This API is now obsolete.

Gets or sets whether the Web Part is visible.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[ObsoleteAttribute("Use Hidden instead.")]
[WebPartStorageAttribute(Storage = Storage.Personal)]
public bool IsVisible { get; set; }

Property Value

Type: System.Boolean
true if the Web Part is visible; otherwise, false. The default value is true.

When the IsVisible property is false, the Web Part can still be connected to other Web Parts.

This property differs from System.Web.UI.Control.Visible in that the Web Part is rendered when the IsVisible property is false; however, the Web Part infrastructure will emit a "display:none" style attribute in the rendering to suppress the display of the Web Part.

This property can be personalized by individual users. Its WebPartStorageAttribute value is Storage.Personal, which specifies that the property can be stored on a per-user basis. Only users with the Personalize Web Part pages right can set this property. It can be set programmatically, or it can be set through the Web Part task pane in the personal view of the Web-based user interface, or by using a Windows SharePoint Services-compatible HTML editor, such as Microsoft Office SharePoint Designer 2007.

Beginning with Windows SharePoint Services 3.0, using this property is the only way to hide a static Web Part (one not in a zone).

Community Additions

ADD
Show:
© 2014 Microsoft