⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hotel_reservation.aspx

📁 visual studio.net学习资料
💻 ASPX
字号:

<!-- ===========================================================================
 
  Copyright (C) 2000 Microsoft Corporation
  All rights reserved

  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND/OR
  FITNESS FOR A PARTICULAR PURPOSE.

  File name: hotel_reservation.aspx

  Application: Conference registration

  Tested: with IE5.5 / Windows 2000

  This file contains the validation form that allows a user to reserve a room
  in a hotel

  Technical details:

  This page uses the asp.net validation controls

============================================================================ -->

<%@ Page Language="vb" %>
<%@ Register TagPrefix="Conference" TagName="Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="Conference" TagName="Menu" Src="_Menu.ascx" %>

<script language="VB" runat="server">

  '*******************************************************
  '
  ' The cmdSubmit_Click event is used to display the
  ' confirmation for the hotel reservation
  '
  '*******************************************************

  Sub cmdSubmit_Click(Sender As Object, E As EventArgs)

    ' Test if the date range is valid
    If calEndingDate.SelectedDate <= calStartingDate.SelectedDate Then
      lblReservationConfirmation.Text = _
        "The end date cannot be before the start date."
    Else
      lblReservationConfirmation.Text = _
        "Congratulations. There is an available room for you.<br>" & _
        "Room type: " & _
        lstRoomType1.SelectedItem.Text & ", " & _
        lstRoomType2.SelectedItem.Text & "<br>" & _
        "from: " & calStartingDate.SelectedDate.Format("d", DBNull) & _
        " to " & calEndingDate.SelectedDate.Format("d", DBNull)
    End If


  End Sub

</script>



<!-- =========================== User Interface ============================ -->

<html>
  <head>
    <title>Hotel Reservation</title>

  </head>

    <body background="images/sitebkgrd.gif" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0">


    <!-- HEADER AND MENUS -->

    <table width="100%" border=0>

      <tr><td><Conference:Header runat="server"/></td></tr>
      <tr><td>
          <table width="100%" border=0>
            <tr><td valign="top">
                  <Conference:Menu runat="server"/>
                </td>
                <td>


    <!-- CONTENT -->
      <center>

      <form runat="server">

      <!-- Calendar -->

      <table border width=500>
      <tr>

        <b> Select a Room Type: </b><br>
        <asp:DropDownList id="lstRoomType1" runat="server">
          <asp:ListItem selected="true">Single</asp:ListItem>
          <asp:ListItem>Double</asp:ListItem>
        </asp:DropDownList>

        <asp:DropDownList id="lstRoomType2" runat="server">
          <asp:ListItem selected="true">No Smoking</asp:ListItem>
          <asp:ListItem>Smoking</asp:ListItem>
        </asp:DropDownList>
        <br><br>

      </tr>
    
      <tr>
        <td>
 
          <SPAN>Starting date:</SPAN><br><br>

          <!-- First column: Starting date -->   
          <!-- ========== Calendar ========== -->
   
          <asp:Calendar id="calStartingDate" runat="server"

            BackColor="#9FC89F" ForeColor="#313179"
            BorderWidth="3"
            BorderStyle="Solid" BorderColor="#313179"
            CellSpacing="2" CellPadding="2"
            ShowGridLines=true

            TitleStyle-BackColor="white"
            TitleStyle-ForeColor="black"

          />

        </td>

        <td>

          <SPAN>Ending date:</SPAN><br><br>
 
          <!-- Second column: Ending date -->   
          <!-- ========== Calendar ========== -->
   
          <asp:Calendar id="calEndingDate" runat="server"

            BackColor="#9FC89F" ForeColor="#313179"
            BorderWidth="3"
            BorderStyle="Solid" BorderColor="#313179"
            CellSpacing="2" CellPadding="2"
            ShowGridLines=true

            TitleStyle-BackColor="white"
            TitleStyle-ForeColor="black"

          />

        </td>
      </tr> 

      </table>

      <br>

      <asp:button id="cmdOK" Text="Reserve" OnClick="cmdSubmit_Click" runat="server"/>

      <br><br>
                        
      <asp:Label id="lblReservationConfirmation" runat="server"/>

      <br>


    </form>

    </center>


    <!-- END OF CONTENT -->  

                </td>

             </tr>

          </table>

      </td></tr>

    </table>


    <!-- END OF HEADER AND MENU -->    

  </body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -