我有一个租用小假期的网站,并在预订时填写表格: http://barn.plymptonfarm.com/barn/booking-form.aspx 不幸的是,虽然它工作正常,但用户无法看到表单已成功发送。
我很难找到答案,有人可以给我一些建议吗?
非常感谢!!
副本的副本:
Protected Sub Button2_Click(sender As Object, e As System.EventArgs) Handles Button2.Click
Try
Using message As New MailMessage()
message.From = New MailAddress(Email1.Text.ToString())
message.[To].Add(New MailAddress("SOMEEMAILADDRESS"))
'message.CC.Add(New MailAddress("copy@domain.com"))
message.Subject = "Message via PlymptonBarn from " + SirNameFam1.Text.ToString()
message.Body = txtArrive1.Text.ToString() & " to " & txtDepart1.Text.ToString() & vbCrLf & FirstName1.Text.ToString() & " " & SirName1.Text.ToString() & " " & BDay1.Text.ToString() & vbCrLf & FirstName2.Text.ToString() & " " & SirName2.Text.ToString() & " " & BDay2.Text.ToString() & ETC ETC ETC..... " Agreed with Conditions: YES" & CheckBox1.Text.ToString()
Dim client As New SmtpClient()
client.Host = "SOMEEMAILHOST"
client.Send(message)
tblsent.Text = "Thank you very much for your email, we will get back to asap"
'successconfirmation.Text = "The message was successfully sent to the webmaster. Thanks for contacting!"
tblsent.Text = "The message was successfully sent to the webmaster. Thanks for contacting!"
Button2.Enabled = False
End Using
Catch ex As Exception
tblsent.Text = ex.ToString
End Try
End Sub
COMPLETE bookingform.asp:
<%@ Page Title="Booking Form for Plympton Barn Holiday Let - South Sands Beach Salcombe" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="booking-form.aspx.vb" Inherits="booking_form" MetaDescription="Booking Form - Plympton Barn Holiday Let" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<style type="text/css">
.style5
{
width: 90%;
border: 1px solid #DDE4EC;
}
.style7
{
width: 256px;
font-size: xx-small;
}
.style8
{
width: 256px;
text-align: right;
}
.style9
{
width: 256px;
text-decoration: underline;
}
.style11
{
height: 31px;
width: 218px;
}
.style12
{
font-size: medium;
}
.style17
{
width: 281px;
font-weight: bold;
}
.style19
{
width: 256px;
font-size: medium;
}
.style20
{
text-align: center;
color: #FF3300;
}
.style21
{
width: 256px;
}
.style22
{
height: 31px;
width: 256px;
}
.style23
{
width: 256px;
font-size: medium;
height: 31px;
}
.style24
{
width: 256px;
font-weight: bold;
text-decoration: underline;
height: 31px;
}
.style26
{
width: 281px;
font-weight: bold;
height: 31px;
}
.style27
{
font-size: small;
}
.style28
{
width: 221px;
font-weight: bold;
height: 31px;
}
.style29
{
width: 221px;
}
.style30
{
width: 221px;
font-weight: bold;
}
.style31
{
height: 31px;
width: 221px;
}
.style32
{
width: 281px;
}
.style33
{
height: 31px;
width: 281px;
}
.style34
{
width: 218px;
}
.style35
{
color: #CC3300;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
<h2 align="center"><ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"
runat="server">
</ajaxToolkit:ToolkitScriptManager>
BOOKING FORM PLYMPTON BARN</h2>
<p class="center">Provisional bookings require return of the booking form and receipt of 25% deposit. </p>
<p class="center"></p>
<p class="center">
(if stay is less than 8 weeks from Booking date the whole amount
is due at the time of booking).</p>
<p class="center">IMPORTANT. Please note that you should only book if you accept the
<a href="conditions.aspx">booking conditions</a> as listed elsewhere on this website</p>
<p class="center">Please note bookings are only valid once confirmed by the owner.</p>
<p class="style20"><strong>
<span class="style27">If you have problems with the form below
<a href="http://barn.plymptonfarm.com/barn/enquiries.aspx">PLEASE USE THE
ENQUIRY FORM</a> or <a href="mailto:barn@plymptonfarm.com">EMAIL</a>-(Barn@plymptonfarm.com)</span> </strong></p>
<p> <table align="center" class="style5">
<tr>
<td class="style24">
Dates:</td>
<td class="style28">
Arrive</td>
<td class="style26">
Depart</td>
<td class="style11">
</td>
</tr>
<tr>
<td class="style21">
</td>
<td class="style29">
<asp:TextBox ID="txtArrive1" runat="server" ForeColor="#666666"
PopupButtonID="CalThumb" TabIndex="1"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="txtArrive1_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtArrive1" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="txtArrive1_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtArrive1" Format="dd/MM/yyyy" PopupButtonID="CalThumb">
</ajaxToolkit:CalendarExtender>
</td>
<td class="style32">
<asp:TextBox ID="txtDepart1" runat="server" PopupButtonID="CalThumb2"
ForeColor="#666666" TabIndex="2"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2"
runat="server" Enabled="True" TargetControlID="txtDepart1" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb2" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="txtDepart1_CalendarExtender"
runat="server" Enabled="True" TargetControlID="txtDepart1" Format="dd/MM/yyyy" PopupButtonID="CalThumb2">
</ajaxToolkit:CalendarExtender>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
</td>
<td class="style29">
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style9">
<strong>Names:</strong></td>
<td class="style30">
First Name</td>
<td class="style17">
Surname</td>
<td class="style34">
<b>Date of Birth</b></td>
</tr>
<tr>
<td class="style8">
1</td>
<td class="style29">
<asp:TextBox ID="FirstName1" runat="server" TabIndex="3"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName1" runat="server" TabIndex="4"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay1" runat="server" PopupButtonID="CalThumb3" TabIndex="5"
ForeColor="#666666"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3"
runat="server" Enabled="True" TargetControlID="Bday1" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb3" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay1_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay1" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb3">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style8">
2</td>
<td class="style29">
<asp:TextBox ID="FirstName2" runat="server" TabIndex="6"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName2" runat="server" TabIndex="7"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay2" runat="server" PopupButtonID="CalThumb4" ForeColor="#666666" TabIndex="8"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender4"
runat="server" Enabled="True" TargetControlID="BDay2" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb4" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay2_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay2" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb4">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style8">
3</td>
<td class="style29">
<asp:TextBox ID="FirstName3" runat="server" TabIndex="9"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName3" runat="server" TabIndex="10"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay3" runat="server" PopupButtonID="CalThumb5" ForeColor="#666666" TabIndex="11"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender5"
runat="server" Enabled="True" TargetControlID="BDay3" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb5" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay3_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay3" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb5">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style8">
4</td>
<td class="style29">
<asp:TextBox ID="FirstName4" runat="server" TabIndex="12"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName4" runat="server" TabIndex="13"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay4" runat="server" PopupButtonID="CalThumb6" ForeColor="#666666" TabIndex="14"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender6"
runat="server" Enabled="True" TargetControlID="BDay4" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb6" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay4_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay4" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb6">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style8">
5</td>
<td class="style29">
<asp:TextBox ID="FirstName5" runat="server" TabIndex="15"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName5" runat="server" TabIndex="16"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay5" runat="server" PopupButtonID="CalThumb7" ForeColor="#666666" TabIndex="17"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender7"
runat="server" Enabled="True" TargetControlID="BDay5" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb7" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay5_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay5" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb7">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style8">
6</td>
<td class="style29">
<asp:TextBox ID="FirstName6" runat="server" TabIndex="18"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirName6" runat="server" TabIndex="19"></asp:TextBox>
</td>
<td class="style34">
<asp:TextBox ID="BDay6" runat="server" PopupButtonID="CalThumb8" ForeColor="#666666"
ToolTip="format: dd/mm/yyyy" TabIndex="20"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender8"
runat="server" Enabled="True" TargetControlID="BDay6" WatermarkText="dd/mm/yyyy" WatermarkCssClass="watermarked"/>
</ajaxToolkit:TextBoxWatermarkExtender>
<asp:ImageButton runat="server" ID="CalThumb8" AlternateText="CalButton" ImageUrl="~/images/CalThumb.png" />
<ajaxToolkit:CalendarExtender ID="BDay6_CalendarExtender" runat="server"
Enabled="True" TargetControlID="BDay6" Format="dd/MM/yyyy" DefaultView="Years" PopupButtonID="CalThumb8">
</ajaxToolkit:CalendarExtender>
</td>
</tr>
<tr>
<td class="style21">
</td>
<td class="style29">
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style9">
<strong>Address:</strong></td>
<td class="style30">
Family 1</td>
<td class="style17">
Family 2 (if applicable)</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
</td>
<td class="style29">
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
Surname</td>
<td class="style29">
<asp:TextBox ID="SirNameFam1" runat="server" TabIndex="21"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="SirNameFam2" runat="server" TabIndex="31"></asp:TextBox>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
House Name</td>
<td class="style29">
<asp:TextBox ID="HouseName1" runat="server" TabIndex="22"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="HouseName2" runat="server" TabIndex="32"></asp:TextBox>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
House number/Street</td>
<td class="style29">
<asp:TextBox ID="Street1" runat="server" TabIndex="23"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="Street2" runat="server" TabIndex="33"></asp:TextBox>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
Town</td>
<td class="style29">
<asp:TextBox ID="Town1" runat="server" TabIndex="24"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="Town2" runat="server" TabIndex="34"></asp:TextBox>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style21">
County</td>
<td class="style29">
<asp:TextBox ID="County1" runat="server" TabIndex="25"></asp:TextBox>
</td>
<td class="style32">
<asp:TextBox ID="County2" runat="server" TabIndex="35"></asp:TextBox>
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style19">
Bedroom 1<br />
- Kingsize Bed</td>
<td class="style29">
<asp:CheckBox ID="KingSize1" runat="server" ClientIDMode="Static"
EnableViewState="False" TabIndex="45" />
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style19">
Bedroom 2
<br />
- one single bed</td>
<td class="style29">
<asp:CheckBox ID="SingleBed1" runat="server" ClientIDMode="Static"
EnableViewState="False" TabIndex="46" />
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style19">
- second single bed </td>
<td class="style29">
<asp:CheckBox ID="SingleBed2" runat="server" ClientIDMode="Static"
EnableViewState="False" TabIndex="47" />
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style23">
Sofabed in Living</td>
<td class="style31">
<asp:CheckBox ID="SofaBed1" runat="server" ClientIDMode="Static"
EnableViewState="False" TabIndex="48" />
</td>
<td class="style33">
</td>
<td class="style11">
</td>
</tr>
<tr>
<td class="style19">
</td>
<td class="style29">
</td>
<td class="style32">
</td>
<td class="style34">
</td>
</tr>
<tr>
<td class="style19">
Any other comments:
</td>
<td class="style29">
<asp:TextBox ID="OtherComments" runat="server" Height="77px" Width="253px"
TabIndex="49"></asp:TextBox>
<asp:Label ID="tblsent" runat="server" Text=""></asp:Label>
</td>
<td class="style32">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:CheckBox ID="CheckBox1" runat="server"
AutoPostBack="True" TabIndex="50" />I agree with the
<a href="conditions.aspx" target="_blank">booking conditions</a>.
<asp:Button ID="Button2" runat="server" Text="Submit Form" Enabled="False"
TabIndex="51" />
</td>
</table>
</tr> <span
Tick Checkbox!</strong></span></ContentTemplate>
</asp:UpdatePanel>
<p><b>Or call us on:</b></p>
<address class="center">
020-32 90 20 22
(Skype In number)<br />
</address>
<p><b>Or call us on Skype</b></p>
<p>
<a href="skype:SkypeJaapMeijer?call">
<img src="http://download.skype.com/share/skypebuttons/buttons/call_blue_white_124x52.png"
style="border-style: none; border-color: inherit; border-width: medium; text-align: center;"
width="124" height="52" alt="Skype Me™!" align="middle" /></a></p>
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
<tr>
<td class="style19">
</td>
<td class="style29">
</td>
<td class="style32">
</asp:Content>