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 ...

Get Programming ASP.NET 3.5, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.