I am not the best coder, and most of this is self taught. now this is a little form i am making in work, i have made two forms like this previously both with 2 required fields that are validated. works fine!
This form is basically the same with more fields hower i get a server Error when i preview the page in a browser??
Can anyone spot what the problem might be i have been through it all, hoping new eyes may help and explain what the issue is.
thanks
This form is basically the same with more fields hower i get a server Error when i preview the page in a browser??
Can anyone spot what the problem might be i have been through it all, hoping new eyes may help and explain what the issue is.
thanks
Code:
<%@ Page Explicit="true" Language="VB" Debug="true" %>
<%@ Import Namespace="System.Web.Mail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Submit(ByVal Sender As Object, ByVal E As System.EventArgs)
Dim EmailTo As String = "[email protected]"
Dim EmailFrom As String = "[email protected]"
Dim EmailSubject As String = "SST - Submission Form"
Dim EmailBody As String
EmailBody = "Advisors Name: " & txtName.Text & vbCrLf & "Date of Submission: " & txtDate.Text & vbCrLf & "Account Number: " & txtAccnum.Text & vdCrLf & "Customers Name: " & txtCust.Text & vdCrLf & "Customers Tel: " & txtTel.Text & vdCrLf & "Customer already with team: " & txtcheck.Text & vdCrLf & "Description Of Query: " & txtDescript.Text & "Callback Time: " & txtcb.Text
SmtpMail.SmtpServer = "aint101xmb.retail2u.trcg.co.uk"
System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, EmailSubject, EmailBody)
Response.Redirect("http://web-finserv/collections/Work_In_Progress/thankyou_suggestions.htm")
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Company - Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--
#
#
-->
<script>
var author = "";
var contact = "<a href='mailto:[email protected]'>My Name</a>";
</script>
<link href="../../beta_site/includes/sdfc_mainstyle.css" type="text/css" rel="stylesheet" /> <!-- comment: replaced redundant code 1 --><style type="text/css">
<!--
html {
scrollbar-base-color: #BDD732;
scrollbar-arrow-color: BLACK;
scrollbar-track-color: #BDD732;
scrollbar-shadow-color: black;
scrollbar-lightshadow-color: black;
scrollbar-darkshadow-color: gray;
scrollbar-highlight-color: white;
scrollbar-3dlight-color: black;
}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body>
<div id="container2"><!-- comment: replaced redundant code 2 --><!-- comment: replaced redundant code 3 --><div id="mainPageContent2"><!-- This is the start of the area that can be edited -->
<h1>Special Support Team Submission Form</h1>
<form id="frmFeedback" runat="server">
<table border="1" width="100%" id="table1" style="border-width: 0px">
<tr>
<td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top: medium none #000000; border-bottom: medium none #000000" width="674">
<p align="left"> </p>
</td>
<td style="border-style: none; border-width: medium">
<p style="text-align: center">
</td>
</tr>
</table>
<table class="noBorder">
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblName" runat="server" text="Please Enter Your Full Name: "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtName" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvName" runat="server" ControlToValidate="txtName" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblDate" runat="server" text="Please Enter The Date (DD/MM/YY): "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtDate" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvDate" runat="server" ControlToValidate="txtDate" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblAccnum" runat="server" text="Please Enter The Account Number: "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtAccnum" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvAccnum" runat="server" ControlToValidate="txtAccnum" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblCust" runat="server" text="Please Enter The Customer's Full Name: "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtCust" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvCust" runat="server" ControlToValidate="txtCust" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblTel" runat="server" text="Please Enter The Customer's Telephone Number: "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtTel" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvTel" runat="server" ControlToValidate="txtTel" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblcheck" runat="server" text="Is The Customer Already With The Specialist Support Team: "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtcheck" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvcheck" runat="server" ControlToValidate="txtcheck" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center">Please Enter A Brief Description Of The Query:</td>
<td class="noBorder"><asp:TextBox id="txtDescript" runat="server" TextMode="MultiLine" Height="150" Width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvDescript" runat="server" ControlToValidate="txtDescript" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="noBorder">
<p style="text-align: center"><asp:Label id="lblcb" runat="server" text="What Time Is Convenient To Call Back (HH:MM) "></asp:Label></td>
<td class="noBorder"><asp:TextBox id="txtcb" runat="server" width="300"></asp:TextBox></td>
<td class="noBorder"><asp:RequiredFieldValidator id="rfvcb" runat="server" ControlToValidate="txtcb" ErrorMessage="Can't be blank">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<tr>
<td class="noBorder"> </td>
<td class="noBorder" align="right" colspan="2">
<asp:Button id="btnSubmit" runat="server" Text="Submit Form" OnClick="Submit" /></td>
</tr>
</table>
</form>
<p>
</form>
</div>
</div>
<div id="timeStamp2"><script>
if (contact == "") {
document.write("Author: " + author + ", Last Updated: ");
} else {
document.write("Author: " + author + ", " + contact + ", Last Updated: ");
}</script>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d/%m/%Y %I:%M:%S %p" startspan -->28/06/2012 06:12:57 PM<!--webbot bot="Timestamp" i-checksum="29747" endspan --><br/>
<!--webbot bot="HitCounter" i-image="4" I-ResetValue="21000" I-Digits="6" U-Custom startspan --><img src="../../_vti_bin/fpcount.exe/?Page=collections/Work_In_Progress/SST_Submission_form.aspx|Image=4|Digits=6" alt="Hit Counter"><!--webbot bot="HitCounter" i-checksum="42759" endspan -->
</div>
<!-- comment: replaced redundant code 4 --></div>
</body>
</html>