我把我的代码给大家看下..要改和添加的大家帮忙下
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
name.Text = ""
password1.Text = ""
password2.Text = ""
email.Text = ""
homepage.Text = ""
note.Text = ""
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strname, strpassword1, strpassword2, strnote, stremail, strhomepage, strpassword As String
'读取用户输入数据
strname = "name.Text"
strpassword1 = "password1.Text"
strpassword2 = "password2.Text"
stremail = "email.Text"
strhomepage = "homepage.Text"
strnote = "note.Text"
'检查输入的内容是否有为空的数据
If strname = "" Then
Response.Write("账号不能为空")
Response.End()
End If
If strpassword1 = "" Then
Response.Write("密码不能为空")
Response.End()
End If
'检查两个密码值是否相同
If strpassword1 = strpassword2 Then
strpassword = strpassword1
Else
Response.Write("确认两次密码一致")
Response.End()
End If
'打开数据库和数据库的值进行比对
Dim conn As String
conn = "DBQ=" + Server.MapPath("db1.mdb") + ";Defaultdir=;DRIVER={Microsoft Aceess Driver(*.mdb)};"
'把值添加入数据库
Response.Write("恭喜你注册成功")
End Sub