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

C#编程

开发平台:

Others

  1. <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="PCSWebApp4.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" DataTextField="Room" DataValueField="ID"></asp:DropDownList>
  42.             <asp:RequiredFieldValidator ID="validateRoom" Runat="server" ErrorMessage="You must select a room." ControlToValidate="roomList"
  43.               Display="None" />
  44.           </td>
  45.         </tr>
  46.         <tr>
  47.           <td valign="top">Attendees:</td>
  48.           <td valign="top">
  49.             <asp:ListBox ID="attendeeList" Runat="server" Width="160px" SelectionMode="Multiple" Rows="6"
  50.               DataTextField="Name" DataValueField="ID" />
  51.             <asp:RequiredFieldValidator ID="validateAttendees" Runat="server" ErrorMessage="You must have at least one attendee."
  52.               ControlToValidate="attendeeList" Display="None" />
  53.           </td>
  54.         </tr>
  55.         <tr>
  56.           <td align="center" colspan="3">
  57.             <asp:Button ID="submitButton" Runat="server" Width="100%" Text="Submit meeting room request" />
  58.           </td>
  59.         </tr>
  60.         <tr>
  61.           <td align="center" colspan="3">
  62.             <asp:ValidationSummary ID="validationSummary" Runat="server" HeaderText="Before submitting your request:" />
  63.           </td>
  64.         </tr>
  65.         <tr>
  66.           <td align="left" colSpan="3" width="100%">
  67.             <table cellspacing="4">
  68.               <tr>
  69.                 <td width="40%" bgcolor="#ccffcc">
  70.                   <asp:DataList Runat="server" ID="eventDetails2" OnSelectedIndexChanged="eventDetails2_SelectedIndexChanged">
  71.                     <ItemTemplate>
  72.                       <asp:LinkButton Runat="server" CommandName="Select" ForeColor="#0000ff" ID="Linkbutton1" CausesValidation="false">
  73.                         <%# DataBinder.Eval(Container.DataItem,
  74.                                                         "Name")%>
  75.                       </asp:LinkButton>
  76.                       <br>
  77.                     </ItemTemplate>
  78.                     <SelectedItemTemplate>
  79.                       <b>
  80.                         <%# DataBinder.Eval(Container.DataItem,
  81.                                                         "Name") %>
  82.                       </b>
  83.                       <br>
  84.                     </SelectedItemTemplate>
  85.                   </asp:DataList>
  86.                 </td>
  87.                 <td valign="top">
  88.                   <asp:Label Runat="server" ID="edName" Font-Name="Arial" Font-Bold="True" Font-Italic="True"
  89.                     Font-Size="14">
  90.                               Select an event to view details.
  91.                            </asp:Label>
  92.                   <br>
  93.                   <asp:Label Runat="server" ID="edDate" />
  94.                   <br>
  95.                   <asp:Label Runat="server" ID="edRoom" />
  96.                   <br>
  97.                   <asp:Label Runat="server" ID="edAttendees" />
  98.                 </td>
  99.               </tr>
  100.             </table>
  101.           </td>
  102.         </tr>
  103.       </table>
  104.       <br>
  105.       Results:
  106.       <asp:Label Runat="server" ID="resultLabel" Text="None." />
  107.       <br>
  108.       <br>
  109.       <asp:DataGrid Runat="server" ID="eventDetails1" />
  110.     </form>
  111.   </body>
  112. </HTML>