回复 6楼 冰镇柠檬汁儿
是.net控件
附上代码,麻烦诸位了
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim logname As String
Dim logpsw As String
Dim username As String
Dim email As String
Dim address As String
Dim birthday As String = ""
Dim birthdayyear As String = ""
Dim birthdaymonth As String = ""
Dim birthdayday As String = ""
logname = TextBoxlogname.Text
logpsw = TextBoxlogpassword.Text
username = TextBoxusername.Text
email = TextBoxemail.Text
address = TextBoxaddress.Text
Dim connect As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection
connect.ConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("App_Data/database/shopping system of ultra electronics website.mdb"))
Dim cmd As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand
cmd.Connection = connect
= "select logname from userinfo where logname=" + "'" + logname + "'"
Dim result As String
If DropDownList1.SelectedIndex <> 0 Then
birthdayyear = DropDownList1.SelectedItem.Text
End If
If DropDownList2.SelectedIndex <> 0 Then
birthdaymonth = DropDownList2.SelectedItem.Text
End If
If DropDownList3.SelectedIndex <> 0 Then
birthdayday = DropDownList3.SelectedItem.Text
End If
birthday = birthdayyear + "/" + birthdaymonth + "/" + birthdayday
Try
connect.Open()
result = cmd.ExecuteScalar
If result = logname Then
Response.Write("The logname is existed")
Else
= "insert into userinfo (logname,[password],username,gender,address,email,birthday) values ('" + logname + "','" + logpsw + "','" + username + "','" + gender + "','" + address + "','" + email + "','" + birthday + "')"
cmd.ExecuteNonQuery()
Response.Redirect("Registrationsuccessful.aspx?logname=" + logname)
End If
Catch ex As Exception
Response.Write(ex.Message)
End Try
connect.Close()
End Sub