Hi guys,
I've looked around and read, I'm not looking for a OnClientClick that can be added to the server side button. I need something that will direct anyone who clicks on submit to another page where they would see what they've filled out. Eventually, this will have their email address and etc (it will be a form) I would like to know how to get it to a confirmation page before I begin with adding additional things to the form. Confirmaton page obviously should allow them to view all of fields with the data they've entered.
For ex: we could work with Full Name: w/e they entered here
Confirmation page would display that, with the ability to Cancel or Confirm and Submit. // which updates the database at the point
Here's the code I've developed
NOTE: THE DATE IS HIDDEN TO THE END USER, let's just focus on getting to the next page
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
Sub btnSubmit_OnClick(sender As Object, e As EventArgs)
Dim myConn As SqlConnection = New SqlConnection("Integrated Security=false;Data Source=test;Initial Catalog=Test;Persist Security Info=True;User ID=teradad34;Password=dasdada2")
myConn.Open()
Dim sqlstring As String = "INSERT INTO leaveform (Date) VALUES (getdate())"
Dim cmd As SqlCommand = New SqlCommand(sqlstring, myConn)
cmd.ExecuteNonQuery()
myConn.Close()
End Sub
</script>
<html>
<head>
<meta http-equiv="expires" content="0">
<title>Untitled Document</title>
</head>
<body>
<form method="POST" action="leaverequest.aspx" runat="server">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_OnClick" />
</form>
</body>
</html>