View control

The MultiView control acts as an outer container for one or more View controls. The View controls, in turn, can contain any combination of markup and controls. You can use the MultiView and View controls to perform tasks such as providing alternate sets of controls based on user choice or creating a multi-page form.

To add a View control to a page

  1. If your page does not already include a MultiView control, drag the MultiView control from the Toolbox task pane to your page.

  2. Drag the View control from the Toolbox task pane and drop it on your MultiView control.

For a full description of all View control properties, see View Properties in the MSDN library.

After you have added one or more View controls to your page, you can add other controls and HTML text to the View control.

Rendering View Control Content

Neither the MultiView control nor individual View controls render any markup to the page other than the contents of the current View control. For example, the controls do not render a div element in the same way that a Panel control does. However, they also do not support appearance properties that can be applied as a whole to the current View control.

Referencing Controls

Each View control supports a Controls property that contains a collection of the controls in that View control. However, you can reference the controls in the View controls individually in code. For details, see Accessing ASP.NET Controls Programmatically in the MSDN library.

For more information about using MultiView and View controls, see MultiView and View Web Server Controls Overview in the MSDN library.