Export (0) Print
Expand All

Page.Visible Property

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

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public override bool Visible { get; set; }
/** @property */
public boolean get_Visible ()

/** @property */
public void set_Visible (boolean value)

public override function get Visible () : boolean

public override function set Visible (value : boolean)

Not applicable.

Property Value

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

The following example sets the 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. When a user clicks the button, the HideButton_Click event handler hides the entire rendered content of the page.

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

 void HideButton_Click(Object sender, EventArgs er)
 {      
this.set_Visible(false);
 } //HideButton_Click

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft