<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MultiViewDemo.aspx.vb" Inherits="MultiViewDemo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>Kontrolki MultiView i View</title>
</head>
<body>
   <form id="form1" runat="server">
   <div>
      <h1>
         Kontrolki MultiView i View</h1>
      <br />
      <asp:RadioButtonList AutoPostBack="True" ID="rblView" OnSelectedIndexChanged="rblView_SelectedIndexChanged"
         RepeatDirection="Horizontal" runat="server">
         <asp:ListItem Value="-1">Żadna</asp:ListItem>
         <asp:ListItem Value="0" Selected="True">Pierwsza</asp:ListItem>
         <asp:ListItem Value="1">Druga</asp:ListItem>
         <asp:ListItem Value="2">Trzecia</asp:ListItem>
         <asp:ListItem Value="3">Ostatnia</asp:ListItem>
      </asp:RadioButtonList>
      <br />
      Bieżący indeks:
      <asp:Label ID="lblCurrentIndex" runat="server"></asp:Label>
      <br />
      <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" OnActiveViewChanged="MultiView1_ActiveViewChanged">
         <asp:View ID="vwFirst" runat="server" OnActivate="ActivateView" OnDeactivate="DeactivateView">
            <h2>
               Pierwsza kontrolka View
            </h2>
            <asp:TextBox ID="txtFirstView" runat="server"></asp:TextBox>
            <asp:Button CommandName="NextView" ID="btnNext1" runat="server" Text="Go To Next" />
            <asp:Button CommandArgument="vwLast" CommandName="SwitchViewByID" ID="btnLast" runat="server"
               Text="Przejdź do ostatniej" />
         </asp:View>
         <asp:View ID="vwSecond" runat="server" OnActivate="ActivateView" OnDeactivate="DeactivateView">
            <h2>
               Druga kontrolka View
            </h2>
            <asp:TextBox ID="txtSecondView" runat="server"></asp:TextBox>
            <asp:Button CommandName="NextView" ID="btnNext2" runat="server" Text="Przejdź do następnej" />
            <asp:Button CommandName="PrevView" ID="btnPrevious2" runat="server" Text="Wróć do poprzedniej" />
         </asp:View>
         <asp:View ID="vwThird" runat="server" OnActivate="ActivateView" OnDeactivate="DeactivateView">
            <h2>
               Trzecia kontrolka View</h2>
            <br />
            <asp:Button CommandName="NextView" ID="btnNext3" runat="server" Text="Przejdź do następnej" />
            <asp:Button CommandName="PrevView" ID="btnPrevious3" runat="server" Text="Wróć do poprzedniej" />
         </asp:View>
         <asp:View ID="vwLast" runat="server" OnActivate="ActivateView" OnDeactivate="DeactivateView">
            <h2>
               Ostatnia kontrolka View
            </h2>
            <asp:Button CommandName="PrevView" ID="btnPrevious4" runat="server" Text="Przejdź do następnej" />
            <asp:Button CommandArgument="0" CommandName="SwitchViewByIndex" ID="btnFirst" runat="server"
               Text="Przejdź do pierwszej" />
         </asp:View>
      </asp:MultiView>
      <br />
      <br />
      Pierwsza kontrolka TextBox:
      <asp:Label ID="lblFirstTextBox" runat="server" />
      <br />
      Druga kontrolkaTextBox:
      <asp:Label ID="lblSecondTextBox" runat="server" />
      <br />
      <br />
      <strong><span style="text-decoration: underline">Historia aktywności kontrolek View:</span></strong>
      <br />
      <asp:Label ID="lblViewActivation" runat="server" />
   </div>
   </form>
</body>
</html>

