Gets or sets a value indicating whether end users are allowed to hide a WebPart control.
Assembly: System.Web (in System.Web.dll)
The Hidden property. In the default case, when the property value is true, users can change the value when the control is being edited. By default, controls are not hidden and their Hidden property value is false. When a WebPart control is being edited, if a user selects a check box to hide the control (which sets the Hidden property to true), the control will no longer be visible when the page returns to browse mode.property determines whether users can modify the
Hidden controls are distinct from controls that are closed, because the Hidden property has a distinct meaning within the Web Parts control set. Closed controls are not even rendered on a page, and do not participate in page life cycle events. In contrast, while hidden WebPart controls are not visible to users, they are still rendered on a Web page, are still contained in a zone, and can still maintain connections with other WebPart controls as part of a Web Parts application.
The code example also uses a custom user control that enables users to change display modes on a Web Parts page. The user control is referenced by means of a Register directive near the top of the Web page that hosts the user control. For a detailed description of how to create this user control and work with display modes, see Walkthrough: Developing and Using a Custom Web Server Control.
In the declarative markup for the Web page, on the <aspSample:TextDisplayWebPart> element that references the control, note the AllowHide="false" attribute, which prevents a user who is editing the control from being able to hide it. Load the page in a browser and use the Display Mode drop-down list control to change the display mode to edit mode. Next, click the verbs menu in the title bar of the WebPart control and click the edit verb. As the edit user interface (UI) is displayed, you can see that the UI to edit the Hidden property is now disabled, which occurred because you set the property value to false.
Available since 2.0