Using the Controls example on the CD-ROM (introduced in the previous topic), you can make a text box visible and invisible, using its Visible property, which all Web server controls support. When you click the "Make text box visible/invisible" button in this example, the code toggles the Visible property of the text box, like this:
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Visible = Not TextBox1.Visible
End Sub
You can see the results in Figure 15.3, where the text box has been made invisible.