Imports System.Data
Imports System.Data.SqlClient
Partial Class Register
Inherits System.Web.UI.Page
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim connectionString As String = "Data Source=MACKSY-PC\SQLEXPRESS;Initial Catalog=computer;Integrated Security=True"
Dim myConnection As SqlConnection = New SqlConnection(connectionString)
myConnection.Open()
Dim myInserQuery As String = "INSERT INTO member1 (username,password,firstname,lastname,email,adress,tel) VALUES ('" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox5.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "')"
Dim myCommand As New SqlCommand(myInserQuery)
myCommand.Connection = myConnection
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
Response.Redirect("login.aspx")
End Sub
End Class