Mega Code Archive

 
Categories / ASP.Net / Asp Control
 

MultiView Demo

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html>   <head>     <title>MultiView Demo</title>     <script runat="server" language="C#">       public void SwitchPage(Object s, EventArgs e)        {         myMultiView.ActiveViewIndex = (myMultiView.ActiveViewIndex + 1) % 2;       }     </script>   </head>   <body>     <form runat="server">       <p>         <asp:Button id="myButton" Text="Switch Page"             runat="server" OnClick="SwitchPage" />       </p>       <asp:MultiView ID="myMultiView" runat="server"           ActiveViewIndex="0">         <asp:View ID="firstView" runat="server">           <p>... contents of the first view ...</p>         </asp:View>         <asp:View ID="secondView" runat="server">           <p>... contents of the second view ...</p>         </asp:View>       </asp:MultiView>     </form>   </body> </html>