- <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="PCSWebApp3.WebForm1" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
- <HTML>
- <HEAD>
- <title>WebForm1</title>
- <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
- <meta name="CODE_LANGUAGE" Content="C#">
- <meta name="vs_defaultClientScript" content="JavaScript">
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
- </HEAD>
- <body MS_POSITIONING="GridLayout">
- <form id="Form1" method="post" runat="server">
- <h1 align="center">
- Enter details and set a day to initiate an event.
- </h1>
- <br>
- <table bordercolor="#000000" cellspacing="0" cellpadding="8" rules="none" align="center"
- bgcolor="#fff99e" border="2" width="540">
- <tr>
- <td valign="top">Your Name:</td>
- <td valign="top">
- <asp:TextBox ID="nameBox" Runat="server" Width="160px" />
- <asp:RequiredFieldValidator ID="validateName" Runat="server" ErrorMessage="You must enter a name." ControlToValidate="nameBox"
- Display="None" />
- </td>
- <td valign="middle" rowspan="4">
- <asp:Calendar ID="calendar" Runat="server" BackColor="White" />
- </td>
- </tr>
- <tr>
- <td valign="top">Event Name:</td>
- <td valign="top">
- <asp:TextBox ID="eventBox" Runat="server" Width="160px" />
- <asp:RequiredFieldValidator ID="validateEvent" Runat="server" ErrorMessage="You must enter an event name." ControlToValidate="eventBox"
- Display="None" />
- </td>
- </tr>
- <tr>
- <td valign="top">Meeting Room:</td>
- <td valign="top">
- <asp:DropDownList ID="roomList" Runat="server" Width="160px" DataTextField="Room" DataValueField="ID"></asp:DropDownList>
- <asp:RequiredFieldValidator ID="validateRoom" Runat="server" ErrorMessage="You must select a room." ControlToValidate="roomList"
- Display="None" />
- </td>
- </tr>
- <tr>
- <td valign="top">Attendees:</td>
- <td valign="top">
- <asp:ListBox ID="attendeeList" Runat="server" Width="160px" SelectionMode="Multiple" Rows="6"
- DataTextField="Name" DataValueField="ID" />
- <asp:RequiredFieldValidator ID="validateAttendees" Runat="server" ErrorMessage="You must have at least one attendee."
- ControlToValidate="attendeeList" Display="None" />
- </td>
- </tr>
- <tr>
- <td align="center" colspan="3">
- <asp:Button ID="submitButton" Runat="server" Width="100%" Text="Submit meeting room request" />
- </td>
- </tr>
- <tr>
- <td align="center" colspan="3">
- <asp:ValidationSummary ID="validationSummary" Runat="server" HeaderText="Before submitting your request:" />
- </td>
- </tr>
- <tr>
- <td align="left" colSpan="3" width="100%">
- <table cellspacing="4">
- <tr>
- <td width="40%" bgcolor="#ccffcc">
- <asp:DataList Runat="server" ID="eventDetails2" OnSelectedIndexChanged="eventDetails2_SelectedIndexChanged">
- <ItemTemplate>
- <asp:LinkButton Runat="server" CommandName="Select" ForeColor="#0000ff" ID="Linkbutton1" CausesValidation="false">
- <%# DataBinder.Eval(Container.DataItem,
- "Name")%>
- </asp:LinkButton>
- <br>
- </ItemTemplate>
- <SelectedItemTemplate>
- <b>
- <%# DataBinder.Eval(Container.DataItem,
- "Name") %>
- </b>
- <br>
- </SelectedItemTemplate>
- </asp:DataList>
- </td>
- <td valign="top">
- <asp:Label Runat="server" ID="edName" Font-Name="Arial" Font-Bold="True" Font-Italic="True"
- Font-Size="14">
- Select an event to view details.
- </asp:Label>
- <br>
- <asp:Label Runat="server" ID="edDate" />
- <br>
- <asp:Label Runat="server" ID="edRoom" />
- <br>
- <asp:Label Runat="server" ID="edAttendees" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <br>
- Results:
- <asp:Label Runat="server" ID="resultLabel" Text="None." />
- <br>
- <br>
- <asp:DataGrid Runat="server" ID="eventDetails1" />
- </form>
- </body>
- </HTML>