-
Notifications
You must be signed in to change notification settings - Fork 0
/
Student0.aspx
154 lines (128 loc) · 7.4 KB
/
Student0.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<%@ Page Title="" Language="C#" MasterPageFile="~/parent.master" AutoEventWireup="true" CodeBehind="Student0.aspx.cs" Inherits="CapstoneFinal.Student0" %>
<asp:Content ID="Content1" ContentPlaceHolderID="nestedFirst" runat="server">
<div>
<br />
<fieldset style="margin:20px; padding:20px; display:inline" >
<legend style="color:#450084; font-size:x-large;">Student Registration </legend>
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblFirstName" runat="server" Text="First Name:"></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtFirstName" runat="server" Text="" Value=""></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorFN" runat="server" ControlToValidate="txtFirstName" Display="Dynamic" ForeColor="Red" SetFocusOnError="true" Text="* This field is required" ErrorMessage="Error: First Name Field is Blank"></asp:RequiredFieldValidator>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblLastName" runat="server" Text="Last Name:"></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtLastName" runat="server" Text="" Value=""></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorLN" runat="server" ControlToValidate="txtLastName" Display="Dynamic" ForeColor="Red" SetFocusOnError="true" Text="* This field is required" ErrorMessage="Error: Last Name Field is Blank"></asp:RequiredFieldValidator>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblAge" runat="server" Text="Age: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtAge" runat="server" Text=""></asp:TextBox>
<asp:Label ID="Label2" runat="server" Text="Gender: "></asp:Label>
<asp:TextBox ID="txtGender" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorAge" runat="server" ControlToValidate="txtAge" Display="Dynamic" ForeColor="Red" SetFocusOnError="true" Text="* This field is required" ErrorMessage="Error: Age Field is Blank"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidatorAge" runat="server" ControlToValidate="txtAge" SetFocusOnError="false" Operator="DataTypeCheck" Type="Integer" ForeColor="Red" Text="Age must be a whole integer" ErrorMessage="Error: Please enter a whole number of years for age"></asp:CompareValidator>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblNotes" runat="server" Text="Notes: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtNotes" runat="server"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label6" runat="server" Text="Dietary Restrictions: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtDiet" runat="server"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label7" runat="server" Text="Parent or Guardian's Full Name: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtParent" runat="server"></asp:TextBox>
</asp:TableCell>
<asp:TableCell>
<asp:Label ID="Label8" runat="server" Text="Parent or Guardian's Email Address: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label3" runat="server" Text="Please check this box if the student's parent will attend: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:CheckBox ID="CheckBox1" runat="server" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<br />
<br />
<asp:Label ID="Label4" runat="server" Text="Teacher:"></asp:Label>
<br />
</asp:TableCell>
<asp:TableCell>
<asp:ListBox ID="teachers" runat="server"></asp:ListBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="* Required Field" ControlToValidate="teachers" Display="Dynamic" ForeColor="Red" SetFocusOnError="true" Text="* This field is required"></asp:RequiredFieldValidator>
</asp:TableCell>
</asp:TableRow>
<br />
<br />
<asp:TableCell>
<asp:Label ID="Label5" runat="server" Text="Consent Form:"></asp:Label>
<br />
</asp:TableCell>
<asp:TableCell>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label1" runat="server" Text="By checking this box, I consent to my child attending Cyberday and that CyberDay may use photographs containing my child for promotional purposes: "></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:CheckBox ID="CheckBox2" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="Parental Consent Required. Please Check Box to Proceed."
onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
</asp:TableCell>
</asp:TableRow>
</asp:TableCell>
<br />
<br />
<asp:Button ID="butClear" runat="server" Text=" Start Over " OnClick="ButClear_Click" CausesValidation="false" BorderStyle="Solid" style="color:red; border-color: #450084"/>
<asp:Button ID="butInsert" runat="server" Text=" Register Student " OnClick="ButInsert_Click" Message="Success! Student Added." BorderStyle="Solid" style="color:#450084; border-color: #450084"/>
</fieldset>
</div>
<br />
<asp:SqlDataSource runat="server"
ID="dsEvent"
ConnectionString="<%$ connectionStrings:lab4 %>"
SelectCommand="Select * FROM Event" />
</asp:Content>