System.Web.UI.WebControls.WebParts.WebPart.Hidden Property

Gets or sets a value indicating whether a System.Web.UI.WebControls.WebParts.WebPart control is displayed on a Web page.

Syntax

public virtual bool Hidden { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

A System.Web.UI.WebControls.WebParts.WebPart control that is hidden remains in its zone, is actually rendered on its page, and participates in page life cycle phases such as the PreRender phase, even though it is not visible in a browser. This is different from System.Web.UI.WebControls.WebParts.WebPart controls that are closed, because closed controls are not even rendered on a page, while hidden controls are rendered and active in Web Parts applications, though not visible to users. The Web Parts control set hides the System.Web.UI.WebControls.WebParts.WebPart control by setting its cascading style sheet (CSS) style to a value of display:none.

Even if the WebPart.Hidden property for a control is set to true, the control is still displayed if the current display mode on the page allows hidden controls to be displayed. For example, edit mode allows hidden controls to be displayed, so that users can edit them. When hidden controls are visible in certain display modes, the title of the control displays a string indicating that the control is in hidden status.

When the WebPart.Hidden property on a System.Web.UI.WebControls.WebParts.WebPart control is set to false, which is the default, the control is displayed on the page. Note that if the WebPart.AllowHide property is set to false, end users are not allowed to edit the WebPart.Hidden property value.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0