CodeCharge Studio

Visible Run-Time Property (ASP)

Applies to

Button Control, Label Control, TextBox Control, TextArea Control, Checkbox Control, Image Control, ImageLink Control, DatePicker Form, Hidden Control, Grid Form, ListBox Control, CheckboxList Control, RadioButton Control, Record Form, Sorter Control, EditableGrid Form, Path Form, Directory Form, FileUpload Control, Panel






object.Visible [=value]


Specifies whether the control is visible. Setting this field to false will prevent the object from being displayed.

Note: Property is tested before calling Before Show event. In order for the property change to be taken into consideration it should be set before Before Show event is called, for instance in the parent component's Before Show event.

Note: Most of the controls need Extended HTML property checked in order to be hidden. This property is available after selecting Edit ... from the context menu of the control during design-time.


The sample code below (placed in the AfterInitialize event procedure of the page) hides the articles grid if the web page is displayed by an anonymous (not logged in) user.
Function Page_AfterInitialize() 

  If IsEmpty(CCGetUserID()) Then
     articles.Visible = false
  End if

End Function

Related Examples

Hiding a Grid If No Records are Found
Hiding a Record Form Control

On-line, printable versions and updates