Private sub Button2_click (byvalgend, byval e as system.eventargs) Handles Button2.click
If TextBox3.Text = "" "or textbox4.text =" "" "" "
Label35.text = "Please confirm your input!"
Return
END IF
DIM SQL AS STRING = "SELECT * from PWD where stu_id = @ stu_id and pwd = @ PWD"
DIM COMM As Sqlcommand = New Sqlcommand (SQL, CONN)
Comm.Parameters.Add (New Sqlparameter ("@ stu_id", sqldbtype.int, 4))
Comm.Parameters ("@ stu_id"). Value = TextBox3.Text
Comm.Parameters.Add (New Sqlparameter ("@ pwd", sqldbtype.char, 16))
Comm.Parameters ("@PWD"). Value = TextBox4.text
DIM DR AS SQLDATAREADER
Conn.open ()
Dr = comm.executeReader
IF Dr.Read Then
Session ("stu_id") = textbox3.text
Dr.close ()
Comm.cancel ()
DIM SQL_3 AS STRING = "Update Stu_Base Set Point = Point 1 Where Stu_ID = @ stu_id"
Comm = New SQLCOMMAND (SQL_3, CONN)
Comm.Parameters.Add (New Sqlparameter ("@ stu_id", sqldbtype.int, 4))
Comm.Parameters ("@ stu_id"). Value = session ("stu_id")
Comm.executenonQuery ()
Comm.cancel ()
Response.Redirect ("Detail.aspx? STU_ID = '" & session ("stu_id") & "'")
Else
Label35.text = "You have not registered or account password errors"
END IF
End Sub
Private sub button1_click (byvale as system.object, byval e as system.eventargs) Handles Button1.click
TextBox1.text = ""
TextBox2.text = ""
End Sub