<%@ import Namespace="System.Web.UI.HTMLControls" %>
<%@ import Namespace="System.Web.Mail" %>
<script runat="server">
'Declaring variables
Dim strname As String
Dim stremail As String
Dim strcurrent As String
Dim strschool As String
Dim strapply As String
Dim strposition As String
Dim strat As String
Dim strpref As String
Dim strnotes As String
Dim strtext As String
Sub Page_Load(sender as Object, e as EventArgs)
If Not Page.IsPostBack then
pnlForm.Visible = True
End If
End Sub
Sub btnSubmit_Click(sender as Object, e as EventArgs)
'Check validation controls in non-IE browsers
If Page.IsValid then
'Get input from the form and assign it to script variables
stremail = Trim(Request.form("user_email"))
if stremail <> "" then
stremail = stremail
end if
strname = Request.Form("user_name")
stremail = Request.Form("user_email")
strcurrent = Request.Form("user_current")
strschool = Request.Form("user_school")
strapply = Request.Form("user_apply")
strposition = Request.Form("user_position")
strat = Request.Form("user_at")
strpref = Request.Form("user_pref")
strnotes = Request.Form("user_notes")
'End if
strtext = "Teacher Name: " & strname & "<br />" & _
"<br />" & _
"Email Address: " & stremail & "<br />" & _
"<br />" & _
"Current Position: " & strcurrent & "<br />" & _
"<br />" & _
"Present School: " & strschool & "<br />" & _
"<br />" & _
"Applying For: " & strapply & "<br />" & _
"<br />" & _
"Position Number: " & strposition & "<br />" & _
"<br />" & _
"School Position At: " & strat & "<br />" & _
"<br />" & _
"Order of Preference " & strpref & "<br />" & _
"<br />" & _
"Additional Notes: " & strnotes & "<br />"
Dim objEmail as New MailMessage()
With objEmail
.BodyFormat = MailFormat.html
.To = "emailto@email.ca"
.cc = stremail
.From = "Posting_1@email.ca"
.Headers.Add("Reply-To", stremail)
.Subject = strname & " applying for position" & strposition & " at " & strat
.Body = strtext
End With
SmtpMail.SmtpServer = "server.ca"
try
SmtpMail.Send(objEMail)
catch exc as Exception
lblErrMsg.Text = ("E-mail was not sent because of a server error: " + exc.ToString())
End Try
pnlForm.Visible = False
'Optionally, you can preserve line breaks in submitted question text
'If you specify MailFormat.html, above, you could use this function to keep line breaks in the message
'as we are doing here in the HTML acknowledgment display:
stremail = replace(stremail,vbNewline,"<br />")
lblAck.Text = ("<h3>Thank you for using the District 6 Posting Form for Posting # 1!</h3><br />" & _
"Your information was submitted as follows:<br />" & _
"Teacher Name: " & strname & "<br />" & _
"<br />" & _
"Email Address: " & stremail & "<br />" & _
"<br />" & _
"Current Position: " & strcurrent & "<br />" & _
"<br />" & _
"Present School: " & strschool & "<br />" & _
"<br />" & _
"Applying For: " & strapply & "<br />" & _
"<br />" & _
"Position Number: " & strposition & "<br />" & _
"<br />" & _
"School Position At: " & strat & "<br />" & _
"<br />" & _
"Order of Preference " & strpref & "<br />" & _
"<br />" & _
"Additional Notes: " & strnotes & "<br />" & _
"<a href='javascript:history.go(-1)'>Back to Filled in Form</a> " & _
"<a href='posting_1.aspx'>Back to Blank Form</a>")
End If
End Sub
Protected Sub user_date_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged2(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Posting Response Form for Posting # 1</title>
<style type="text/css">
body {margin: 0; background-color: #fff; font-family: georgia, serif; }
h1 {font-size: 140%; margin-top: 1em;}
#main {margin-left: 10%;}
.req {font-weight: bold; color: #900;}
.style1
{
font-weight: bold;
color: #0033CC;
}
.style2
{
font-family: Verdana;
}
.style3
{
text-align: left;
width: 158px;
}
.style4
{
width: 158px;
}
</style>
</head>
<body id="subj">
<div id="main">
<p align="center" class="style1"><span class="style2">School District 6</p>
<p align="center" class="style1">Posting Response Form for Posting # 1 </span> </p>
<form runat="server">
<asp:Panel id="pnlForm" runat="server">
<table width="782" border="0">
<tbody>
<tr>
<td align="right" class="style4" style="text-align: left">Teacher Name:</td>
<td width="570">
<asp:textbox id="user_name" runat="server" size="20"
ontextchanged="user_date_TextChanged" BackColor="#FFFFCC" Width="195px"
Height="20px" /></td>
</tr>
<tr>
<td align="right" class="style4" style="text-align: left">Email Address:</td>
<td><asp:textbox id="user_email" runat="server" size="20" BackColor="#FFFFCC"
Width="195px" Height="20px" /></td>
</tr>
<tr>
<td class="style3">Current Position:</td>
<td><asp:textbox id="user_current" runat="server" size="20" BackColor="#FFFFCC"
Width="194px" Height="20px" /></td>
</tr>
<tr>
<td align="right" class="style4" style="text-align: left">Current School: </div></td>
<td>
<asp:DropDownList ID="user_school" runat="server" Height="27px" Width="404px"
BackColor="#FFFFCC">
<asp:ListItem>Apohaqui Elementary</asp:ListItem>
<asp:ListItem>Belleisle Elementary</asp:ListItem>
<asp:ListItem>Belleisle Regional</asp:ListItem>
<asp:ListItem>Dr Leatherbarrow</asp:ListItem>
<asp:ListItem>Fairvale Elementary</asp:ListItem>
<asp:ListItem>Hammond River Elementary</asp:ListItem>
<asp:ListItem>Hampton Elementary</asp:ListItem>
<asp:ListItem>Hampton High</asp:ListItem>
<asp:ListItem>Hampton Middle</asp:ListItem>
<asp:ListItem>Harry Miller Middle</asp:ListItem>
<asp:ListItem>Kennebecasis Park Elementary</asp:ListItem>
<asp:ListItem>Kennebecasis Valley High</asp:ListItem>
<asp:ListItem>Lakefield Elementary</asp:ListItem>
<asp:ListItem>MacDonald Consolidated</asp:ListItem>
<asp:ListItem>Norton Elementary</asp:ListItem>
<asp:ListItem>PALS - Hampton</asp:ListItem>
<asp:ListItem>PALS - Sussex</asp:ListItem>
<asp:ListItem>Quispamsis Elementary</asp:ListItem>
<asp:ListItem>Quispamsis Middle</asp:ListItem>
<asp:ListItem>Rothesay Elementary</asp:ListItem>
<asp:ListItem>Rothesay High</asp:ListItem>
<asp:ListItem>Rothesay Park</asp:ListItem>
<asp:ListItem>Sussex Corner Elementary</asp:ListItem>
<asp:ListItem>Sussex Elementary</asp:ListItem>
<asp:ListItem>Sussex Middle</asp:ListItem>
<asp:ListItem>Sussex Regional High</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</tr __designer:mapid="20">
<tr>
<td align="right" class="style4" style="text-align: left">I am applying for:</td>
<td>
<asp:TextBox ID="user_apply" runat="server" BackColor="#FFFFCC" size="20"
Width="191px" Height="20px" />
Position, Number
<asp:TextBox ID="user_position" runat="server" BackColor="#FFFFCC"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top" class="style3">
Position is at:
<br />
</td>
<td>
<asp:DropDownList ID="user_at" runat="server" Height="28px" Width="404px"
BackColor="#FFFFCC">
<asp:ListItem>Apohaqui Elementary</asp:ListItem>
<asp:ListItem>Belleisle Elementary</asp:ListItem>
<asp:ListItem>Belleisle Regional</asp:ListItem>
<asp:ListItem>Dr Leatherbarrow</asp:ListItem>
<asp:ListItem>Fairvale Elementary</asp:ListItem>
<asp:ListItem>Hammond River Elementary</asp:ListItem>
<asp:ListItem>Hampton Elementary</asp:ListItem>
<asp:ListItem>Hampton High</asp:ListItem>
<asp:ListItem>Hampton Middle</asp:ListItem>
<asp:ListItem>Harry Miller Middle</asp:ListItem>
<asp:ListItem>Kennebecasis Park Elementary</asp:ListItem>
<asp:ListItem>Kennebecasis Valley High</asp:ListItem>
<asp:ListItem>Lakefield Elementary</asp:ListItem>
<asp:ListItem>MacDonald Consolidated</asp:ListItem>
<asp:ListItem>Norton Elementary</asp:ListItem>
<asp:ListItem>PALS - Hampton</asp:ListItem>
<asp:ListItem>PALS - Sussex</asp:ListItem>
<asp:ListItem>Quispamsis Elementary</asp:ListItem>
<asp:ListItem>Quispamsis Middle</asp:ListItem>
<asp:ListItem>Rothesay Elementary</asp:ListItem>
<asp:ListItem>Rothesay High</asp:ListItem>
<asp:ListItem>Rothesay Park</asp:ListItem>
<asp:ListItem>Sussex Corner Elementary</asp:ListItem>
<asp:ListItem>Sussex Elementary</asp:ListItem>
<asp:ListItem>Sussex Middle</asp:ListItem>
<asp:ListItem>Sussex Regional High</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td align="right" class="style4" style="text-align: left">
Order of Preference:</td>
<td>
<asp:TextBox ID="user_pref" runat="server" BackColor="#FFFFCC" size="20" />
</td>
</tr>
<tr>
<td align="right" colspan="2" style="text-align: left">
<br />
Please complete and submit this form before 12:00 Noon on Friday, May 16, 2008<br />
<br />
NOTE: If applying for more than one posting, please submit a seperate form and
indicate your preference of this position.<br />
<br />
If applying for positions in Resource & Methods, Guidance, Music, Art, Phys Ed
or French, please indicate below your qualifications for the position, e.g.
Degree, Course Work, FSL Proficiency Level.<br />
<br />
<asp:TextBox ID="user_notes" runat="server" Height="241px" Width="772px"
BackColor="#FFFFCC"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" class="style4">
<asp:FileUpload ID="FileUpload1" runat="server" />
</td>
<td>
If attaching Resume or Supporting document, inlcude here.</td>
</tr>
<tr>
<td class="style4">
</td>
<td height="40">
<asp:Button ID="btnSubmit" runat="server" onclick="btnSubmit_Click"
text="Submit" />
<input runat="server" name="btnReset" type="reset" value="Reset" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblErrMsg" Runat="server"></asp:Label>
</td>
</tr>
</tr>
</tbody>
</table>
</asp:Panel>
<asp:Label id="lblAck" Runat="server"></asp:Label>
</form>
</div>
</body>
</html>
|