O'Reilly logo

Programming ASP.NET 3.5, 4th Edition by Jesse Liberty, Dan Hurwitz, Dan Maharry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MultiView and View Controls

Sometimes you may want to break a web page into different pieces, displaying only a single piece at a time, with easy transitions from piece to piece. So far, this scenario isn’t any different from an Accordion or TabContainer control. However, the MultiView, View, and Wizard controls add the notion of an order to visit their panels, whereas Tabs and Accordions do not.

The classic use of this addition technique is to walk a user through a number of steps within the context of a static page, such as the checkout procedure from an online store, or the procedure to transfer funds from one account to another. You can also use these controls to create wizard-like applications, although there is now a Wizard control, described shortly, for this exact purpose.

Tip

In fact, the View and MultiView controls were originally designed for mobile devices, which explains their limited capabilities for style (which you’ll see in a minute) and their high utility in pages optimized for low-res screens.

ASP.NET provides the View control to manage the chunks—that is, the content in a section of the page: one View control per chunk. All of the View objects are contained together within a MultiView object, which makes one View object, called the active view, visible at a time.

As shown in Figure 3-8 in Chapter 3, both the View and MultiView controls derive not from WebControl, but directly from System.Web.UI.Control.

The MultiView control has a read-only property called Views, of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required