Using the MultiView and View server controls (VB) : View « ASP.net Controls « ASP.NET Tutorial






<%@ Page Language="VB"%>

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If Not Page.IsPostBack Then
            MultiView1.ActiveViewIndex = 0
        End If
    End Sub
    
    Sub NextView(ByVal sender As Object, ByVal e As System.EventArgs)
        MultiView1.ActiveViewIndex += 1
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>MultiView Server Control</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:MultiView ID="MultiView1" Runat="server">
            <asp:View ID="View1" Runat="Server">
                A<p />
                <i>asdf</i><p />
                <asp:Button ID="Button1" Runat="Server" Text="Next Step" 
                 OnClick="NextView" />
            </asp:View>
            <asp:View ID="View2" Runat="Server">
                B<p />
                <i>sdfg.</i><p />
                <asp:Button ID="Button2" Runat="Server" Text="Next Step" 
                 OnClick="NextView" />
            </asp:View>
            <asp:View ID="View3" Runat="Server">
                C<p />
                <i>dfgh<br />
                </i><p />
            </asp:View>
        </asp:MultiView> 
    </form>
</body>
</html>








3.35.View
3.35.1.Using the MultiView and View server controls (C#)
3.35.2.Using the MultiView and View server controls (VB)