Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

Page.Visible Property

Gets or sets a value indicating whether the Page object is rendered.

[Visual Basic]
Overrides Public Property Visible As Boolean
[C#]
public override bool Visible {get; set;}
[C++]
public: __property bool get_Visible();
public: __property void set_Visible(bool);
[JScript]
public override function get Visible() : Boolean;
public override function set Visible(Boolean);

Property Value

true if the Page is to be rendered; otherwise, false. The default is true.

Example

[Visual Basic, C#] The following example sets the Page.Visible property to false to hide the rendered content of a page. When this page is first requested, a data source is populated and displayed in the page. Whe a user clicks the button, the HideButton_Click event handler hides the entire rendered content of the page.

[Visual Basic] 
Sub HideButton_Click(Sender As Object, er As EventArgs)

   Me.Visible = false

End Sub

[C#] 
void HideButton_Click(Object sender, EventArgs er)
{      
   this.Visible = false;
}

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Page Class | Page Members | System.Web.UI Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.