Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
Dim conn As New SqlConnection("Data Source='F:\shujuku';Initial Catalog='t_o_data.mdf';Persist Security Info=True;User ID='sa';Password=''")
Dim cmd As New SqlCommand("select * form users where user_name='admin' && pas_char='123',conn") conn.Open()
Dim dr As SqlDataAdapter = cmd.ExecuteScalar()
If cmd.ExecuteScalar() = 1 Then
Response.Redirect("1.jpg")
Else
Response.Redirect("11.jpg")
End If
conn.Close()
End Sub
End Class
这时 登录 的Click事件的代码,提示加粗的地方出错看看是为什么