Hello,

I need help with Asp.net file.

I am trying to create a website that will take input from user, and when user clicks submit, it will run the asp.net file which will take the data and place it into a MS Access Table.

I have created the html page, the asp.net file and the db.

But when user clicks Submit, a pop up comes up that asks user to either open, save or cancel the asp.net file.

What am I doing wrong. Here is the code from the Asp.net file:
<% @ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title>Form to database</title>
</head>
<body>
<%
'declare your variables
Dim Card#, FirstName, LastName, DOB, CellPhone, Gender, StoreName, EmailAddress
Dim sConnString, connection, sSQL

' Receiving values from Form, assign the values entered to variables
Card# = Request.welcome.html("Card#")
FirstName = Request.welcome.html("FirstName")
LastName =Request.welcome.html("LastName")
DOB =Request.welcome.html("DOB")
CellPhone =Request.welcome.html("CellPhone")
Gender =Request.welcome.html("Gender")
StoreName =Request.welcome.html("StoreName")
EmailAddress =Request.welcome.html("EmailAddress")

'declare SQL statement that will query the database
sSQL = "INSERT into G&L Table (Card#, First Name, Last Name, DOB, Cell Phone, Gender, Store Name, Email Address) values ('" & Card# & "', '" & FirstName & "', '" & LastName & "', '" & DOB & "', '" & CellPhone & "', '" & Gender & "', '" & StoreName & "','" & EmailAddress & "',)"

'define the connection string, specify database
'driver and the location of database
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("Test1.accdb")


'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")

'Open the connection to the database
connection.Open(sConnString)

'execute the SQL
connection.execute(sSQL)

response.write "The form information was inserted successfully."

' Done. Close the connection object
connection.Close
Set connection = Nothing
%>
</body>
</html>