13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

158<strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong>: A Beginner’s <strong>Guide</strong>The Panel also controls the visibility of all of the other web controls within the Panelcontainer. In fact, with multiple Panels, one Panel could be switched with another. TheVisible property in a Panel web control affects all of the enclosed web controls andthe Panel itself.Display All at OnceThe several display web controls were placed together in a single application to illustratewhat each looks like. Also, by placing all of the different web controls into a Panel webcontrol, you can see how the control can toggle visibility of not only the Panel, but alsoevery other web control in the container.Two buttons are included to change the property value of the Panel. The default isVisible=True, and by having events for both buttons, it’s very easy to toggle thevisibility. First, take a look at Figure 6-18 to get an idea of what your page will look like,and then add the <strong>ASP</strong>.<strong>NET</strong> code shown next in DisplayInfo.aspx.<strong>ASP</strong>.<strong>NET</strong> DisplayInfo.aspxDisplay&nbsp;Mark Anthony&nbsp; &nbsp;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!