Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mycon As SqlConnection
mycon = New SqlConnection("server=localhost;uid=sa;pwd=123456;database=users")
Dim mycom As SqlCommand
mycom = New SqlCommand("pr_queryuser", mycon)
mycom.CommandType = CommandType.StoredProcedure
mycom.Parameters.Add(New SqlParameter("@username", SqlDbType.NVarChar, 4))
mycom.Parameters("@username").Value = TextBox1.Text
mycom.Parameters.Add(New SqlParameter("@userpassword", SqlDbType.NVarChar, 50))
mycom.Parameters("@userpaswword").Value = TextBox2.Text
mycon.Open()
Dim userid As Integer
userid = mycom.ExecuteScalar
If userid <> 0 Then
acookie.Value = True
Response.Cookies.Add(acookie)
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, False)
Else
Response.Redirect("sorry.aspx")
End If
mycon.Close()
End Sub
红色部分是什么意思啊 谢谢~~~