<%@ Page Language="VB"%>

<script runat="server">
    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, _
       ByVal e As System.EventArgs)

      Dim wpDisplayMode As WebParts.WebPartDisplayMode = _
      Webpartmanager1.SupportedDisplayModes(DropDownList1.SelectedValue.ToString())
      Webpartmanager1.DisplayMode = wpDisplayMode
    End Sub

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
      For Each wpMode As WebPartDisplayMode In Webpartmanager1.SupportedDisplayModes            
            Dim modeName As String = wpMode.Name
            Dim dd_ListItem As ListItem = New ListItem(modeName, modeName)
            DropDownList1.Items.Add(dd_ListItem)
      Next
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
  <title>Pklad webovch st</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:WebPartManager ID="Webpartmanager1" Runat="server">
    </asp:WebPartManager>
    <table cellpadding="5" border="1">
      <tr>
        <td colspan="2">
          <h1>Webov strnka Billa Evjena</h1>
          <asp:WebPartZone ID="WebPartZone1" Runat="server"
            LayoutOrientation="Horizontal">
            <ZoneTemplate>
              <asp:Label ID="Label1" Runat="server" Text="Label" 
                Title="Vtejte na m strnce!">
                Vtejte na strnce!
              </asp:Label>
            </ZoneTemplate>
          </asp:WebPartZone>
        </td>
        <td valign="top">
          Vyberte reim:
          <asp:DropDownList ID="DropDownList1" runat="server"
           AutoPostBack="True"
           OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
          </asp:DropDownList>
        </td>
      </tr>
      <tr valign="top">
        <td>
          <asp:WebPartZone ID="WebPartZone2" Runat="server">
            <ZoneTemplate>
              <asp:Image ID="Image1" Runat="server"
                ImageUrl="Images/Erika.jpg"
                Title="Erika v muzeu">
              </asp:Image>
              <asp:BulletedList Title="Zajmav odkazy" 
                    ID="BulletedList1" runat="server" 
                    DisplayMode="HyperLink">
                    <asp:ListItem Value="http://www.asp.net/" 
                         Text="ASP.NET"></asp:ListItem>                    
                    <asp:ListItem Value="http://msdn.microsoft.com/" 
                         Text="MSDN"></asp:ListItem>
                    <asp:ListItem Value="http://www.msn.com/"  
                         Text="MSN"></asp:ListItem>
              </asp:BulletedList>
            </ZoneTemplate>
          </asp:WebPartZone>
        </td>
        <td>
          <asp:WebPartZone ID="WebPartZone3" Runat="server">
            <ZoneTemplate>
              <asp:Calendar ID="Calendar1" Runat="server"
                Title="Kalend">
              </asp:Calendar>
            </ZoneTemplate>
          </asp:WebPartZone>
        </td>
        <td><!-- Zatm przdn -->
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
