If username.Text = "" Then
lblMsg.Text = "请输入用户名!"
ElseIf username.Text <> "" Then
Dim conn As System.Data.OleDb.OleDbConnection
Dim sStr As String
Dim dr As System.Data.OleDb.OleDbDataReader
Dim command As System.Data.OleDb.OleDbCommand
sStr = "Provider=MSDAORA.1;data source=kksb;user id=kksb;password=kksb2007;"
conn = New System.Data.OleDb.OleDbConnection(sStr)
conn.Open()
sStr = "select * from t_user where username='" & username.Text & "' and pwd='" & pwd.Text & "'"
command = New System.Data.OleDb.OleDbCommand(sStr, conn)
dr = command.ExecuteReader()
dr.Read()
If dr.HasRows = True Then
???????
ElseIf dr.HasRows = False Then
lblMsg.Text = "用户名或密码错误!请检查后重试"
End If
dr.Close()
End If
问号处怎样跳转到另一个页面:defalt.aspx