Basic Usage of MultiView and View Controls in ASP.NET - Creating a web page with MultiView and View controls
(Page 2 of 5 )
Create a web site project from file -->New Website... This opens up the New Web Site window from which you choose the ASP.NET Web Site from Visual Studio installed templates. A web site called PageLife was created for this tutorial. The MultiView and View controls are available in the toolbox as shown.

Adding MultiView and View Controls
To the default page add a MultiView control from the ToolBox. This adds a MultiView control visible in the design view, and a corresponding control tag to the source code in the form as shown.
<form id="form1" runat="server">
<div>
<asp:MultiView ID="MultiView1" runat="server">
</asp:MultiView>
</div>
</form>
Currently there is no View control in the MultiView Control. Now with the cursor placed inside the MultiView, double click a View Control in the Toolbox. This adds the View1 control to the default page inside the MultiView Control as shown.

Since the MultiView control is a container for the View control, the source view content changes to reflect this addition as shown. The MultiView and View controls provide design time support, which means going from source to design is completely reversible.
<form id="form1" runat="server">
<div> <asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
<!-- controls that go in View 1 here--> </asp:View> </asp:MultiView> </div>
</form>
Next: Design time properties of View Control >>
More .NET Articles
More By Jayaram Krishnaswamy