Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
If ImageButton3.ImageUrl = ("./images/back.png") Then
Me.Response.Redirect("http://www.volvobusesindia.com")
Else
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New Net.NetworkCredential("info@volvobusesindia.com", "xxxxxx")
SmtpServer.Port = 25
SmtpServer.Host = "mail.volvobusesindia.com"
mail = New MailMessage()
mail.From = New MailAddress("info@volvobusesindia.com")
mail.To.Add(Literal23.Text)
mail.Subject = "VolvoBusesIndia:E-Ticket Confirmation"
mail.Body = "<B>" + "||| -- VOLVOBUSESINDIA : E-Ticket Confirmation -- |||" + "</B>" + "<BR><BR><BR>" + "<B>" + "PNR Number : " + "</B>" & " " & Literal2.Text + "<BR><BR>" + "<B>" + "Payment Reference Number : " + "</B>" & " " & Literal1.Text + "<BR><BR>" + "<B>" + "Ticket Number : " + "</B>" & " " & Literal3.Text + "<BR><BR>" + "<B>" + "Travels : " + "</B>" & " " & Literal4.Text + "<BR><BR>" + "<B>" + "From : " + "</B>" & " " & Literal7.Text + "<BR><BR>" + "<B>" + "To : " + "</B>" & " " & Literal8.Text + "<BR><BR>" + "<B>" + "Journey Date : " + "</B>" & " " & Literal10.Text + "<BR><BR>" + "<B>" + "Departure : " + "</B>" & " " & Literal11.Text + "<BR><BR>" + "<B>" + "Arrival : " + "</B>" & " " & Literal12.Text + "<BR><BR>" + "<B>" + "Boarding Point : " + "</B>" & " " & Literal13.Text + "<BR><BR>" + "<B>" + "Dropping Point : " + "</B>" & " " & Literal14.Text + "<BR><BR>" + "<B>" + "Seat Selected : " + "</B>" & " " & Literal15.Text + "<BR><BR>" + "<B>" + "Seat Opted : " + "</B>" & " " & Literal16.Text + "<BR><BR>" + "<B>" + "Bus Type : " + "</B>" & " " & Literal17.Text + "<BR><BR>" + "<B>" + "Total Amount : " + "</B>" & " " & Literal19.Text + "<BR><BR>" + "<B>" + "Payment Status : " + "</B>" & " " & Label1.Text + "<BR><BR>" + "<B>" + "Paid via : " + "</B>" & " " & Literal20.Text + "<BR><BR>" + "<B>" + "Message : " + "</B>" & " " + "<BR>" & "Volvo Buses India Wishes you a very Happy Journey, hope you satisfied with our services"
mail.IsBodyHtml = True
SmtpServer.Send(mail)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Try
Using conn = New SqlConnection(constr)
Using cmd = conn.CreateCommand()
conn.Open()
Dim sql As String = "UPDATE a1_ticket SET BANK = @bank, PAID = @paid, BID = @bid WHERE Ticket_no = @ticketNo"
cmd.CommandText = sql
cmd.Parameters.AddWithValue("@bank", Literal20.Text)
cmd.Parameters.AddWithValue("@paid", Label1.Text)
cmd.Parameters.AddWithValue("@bid", Literal21.Text)
cmd.Parameters.AddWithValue("@ticketNo", Literal3.Text)
cmd.ExecuteNonQuery()
End Using
End Using
Catch ex As Exception
Response.Write(ex.Message)
End Try
Response.Redirect("~/eticket.aspx?Pno=" & Literal2.Text & "&tid=" & Literal22.Text & "&Status=" & "Print_ticket_success")
End If
End Sub
发现页面未找到错误....但页面已上传...
e ticket.aspx和网站http://www.volvobusesindia.com
答案 0 :(得分:1)
检查页面使用的控件,部分错误是:
(或其中一个依赖项)
这意味着如果您使用MyControl.ascx
并且此类文件不存在,则会出现相同的404
错误。
答案 1 :(得分:0)
检查页面
eticket.aspx
存在于应用程序的根文件夹中。在线快速查看显示,www.volvobusesindia.com的根目录中不存在eticket.aspx。
也许您的应用程序位于子文件夹中?
答案 2 :(得分:0)
http://www.volvobusesindia.com/eticket.aspx给了我404页面找不到异常。你能再次检查一下这个页面的存在吗?
答案 3 :(得分:0)
几点:
您当前的背景是clixngo.com还是volvobusesindia。如果它的沃尔沃公共汽车印度,那么我们遇到404.
Response.Redirect(〜/ ..)仅适用于当前域。对于其他域,您必须指定整个字符串。