<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head 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 />
         Biecy 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 ID="btnNext1" runat="server"
                  CommandName="NextView"
                  Text="Przejd do nastpnej" />
               <asp:Button ID="btnLast" runat="server"
                  CommandArgument="vwLast"
                  CommandName="SwitchViewByID"
                  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 ID="btnNext2" runat="server"
                  CommandName="NextView"
                  Text="Przejd do nastpnej" />
               <asp:Button ID="btnPrevious2" runat="server"
                  CommandName="PrevView"
                  Text="Wr do poprzedniej" />
            </asp:View>
            <asp:View ID="vwThird" runat="server"
               OnActivate="ActivateView"
               OnDeactivate="DeactivateView">
               <h2>Trzecia kontrolka View</h2>
               <br />
               <asp:Button ID="btnNext3" runat="server"
                  CommandName="NextView"
                  Text="Przejd do nastpnej" />
               <asp:Button ID="btnPrevious3" runat="server"
                  CommandName="PrevView"
                  Text="Wr do poprzedniej" />
            </asp:View>
            <asp:View ID="vwLast" runat="server"
               OnActivate="ActivateView"
               OnDeactivate="DeactivateView">
               <h2>Ostatnia kontrolka View</h2>
               <asp:Button ID="btnPrevious4" runat="server"
                  CommandName="PrevView"
                  Text="Wr do poprzedniej" />
               <asp:Button ID="btnFirst" runat="server"
                  CommandArgument="0"
                  CommandName="SwitchViewByIndex"
                  Text="Przejd do pierwszej" />
            </asp:View>
         </asp:MultiView>
      <br />
      <br />
      Pierwsza kontrolka TextBox:
      <asp:Label ID="lblFirstTextBox" runat="server" />
      <br />
      Druga kontrolka TextBox:
      <asp:Label ID="lblSecondTextBox" runat="server" />
      <br />
      <br />
      <strong><span style="text-decoration: underline">
         Historia aktywnoci kontrolek View:</span></strong>
      <br />
      <asp:Label ID="lblViewActivation" runat="server" />
   </div>
   </form>
</body>
</html>
