WebForm1.aspx
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:4k
源码类别:

C#编程

开发平台:

Others

  1. <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="PCSWebApp2.WebForm1" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4.   <HEAD>
  5.     <title>WebForm1</title>
  6.     <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
  7.     <meta name="CODE_LANGUAGE" Content="C#">
  8.     <meta name="vs_defaultClientScript" content="JavaScript">
  9.     <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
  10.   </HEAD>
  11.   <body MS_POSITIONING="GridLayout">
  12.     <form id="Form1" method="post" runat="server">
  13.       <h1 align="center">
  14.         Enter details and set a day to initiate an event.
  15.       </h1>
  16.       <br>
  17.       <table bordercolor="#000000" cellspacing="0" cellpadding="8" rules="none" align="center"
  18.         bgcolor="#fff99e" border="2" width="540">
  19.         <tr>
  20.           <td valign="top">Your Name:</td>
  21.           <td valign="top">
  22.             <asp:TextBox ID="nameBox" Runat="server" Width="160px" />
  23.             <asp:RequiredFieldValidator ID="validateName" Runat="server" ErrorMessage="You must enter a name." ControlToValidate="nameBox"
  24.               Display="None" />
  25.           </td>
  26.           <td valign="middle" rowspan="4">
  27.             <asp:Calendar ID="calendar" Runat="server" BackColor="White" />
  28.           </td>
  29.         </tr>
  30.         <tr>
  31.           <td valign="top">Event Name:</td>
  32.           <td valign="top">
  33.             <asp:TextBox ID="eventBox" Runat="server" Width="160px" />
  34.             <asp:RequiredFieldValidator ID="validateEvent" Runat="server" ErrorMessage="You must enter an event name." ControlToValidate="eventBox"
  35.               Display="None" />
  36.           </td>
  37.         </tr>
  38.         <tr>
  39.           <td valign="top">Meeting Room:</td>
  40.           <td valign="top">
  41.             <asp:DropDownList ID="roomList" Runat="server" Width="160px">
  42.               <asp:ListItem Value="1">The Happy Room</asp:ListItem>
  43.               <asp:ListItem Value="2">The Angry Room</asp:ListItem>
  44.               <asp:ListItem Value="3">The Depressing Room</asp:ListItem>
  45.               <asp:ListItem Value="4">The Funked Out Room</asp:ListItem>
  46.             </asp:DropDownList>
  47.             <asp:RequiredFieldValidator ID="validateRoom" Runat="server" ErrorMessage="You must select a room." ControlToValidate="roomList"
  48.               Display="None" />
  49.           </td>
  50.         </tr>
  51.         <tr>
  52.           <td valign="top">Attendees:</td>
  53.           <td valign="top">
  54.             <asp:ListBox ID="attendeeList" Runat="server" Width="160px" SelectionMode="Multiple" Rows="6">
  55.               <asp:ListItem Value="1">Bill Gates</asp:ListItem>
  56.               <asp:ListItem Value="2">Monica Lewinsky</asp:ListItem>
  57.               <asp:ListItem Value="3">Vincent Price</asp:ListItem>
  58.               <asp:ListItem Value="4">Vlad the Impaler</asp:ListItem>
  59.               <asp:ListItem Value="5">Iggy Pop</asp:ListItem>
  60.               <asp:ListItem Value="6">William
  61.                Shakespeare</asp:ListItem>
  62.             </asp:ListBox>
  63.             <asp:RequiredFieldValidator ID="validateAttendees" Runat="server" ErrorMessage="You must have at least one attendee."
  64.               ControlToValidate="attendeeList" Display="None" />
  65.           </td>
  66.         </tr>
  67.         <tr>
  68.           <td align="center" colspan="3">
  69.             <asp:Button ID="submitButton" Runat="server" Width="100%" Text="Submit meeting room request" />
  70.           </td>
  71.         </tr>
  72.         <tr>
  73.           <td align="center" colspan="3">
  74.             <asp:ValidationSummary ID="validationSummary" Runat="server" HeaderText="Before submitting your request:" />
  75.           </td>
  76.         </tr>
  77.       </table>
  78.       <br>
  79.       Results:
  80.       <asp:Label Runat="server" ID="resultLabel" Text="None." />
  81.     </form>
  82.   </body>
  83. </HTML>