vb.net

位置:IT落伍者 >> vb.net >> 浏览文章

一个vb.net的用户登陆页面代码


发布日期:2021年06月26日
 
一个vb.net的用户登陆页面代码

Private Sub Button_Click(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ButtonClick

If TextBoxText = Or TextBoxText = Then

LabelText = 请确认您的输入!

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)

commParametersAdd(New SqlParameter(@stu_id SqlDbTypeInt ))

commParameters(@stu_idValue = TextBoxText

commParametersAdd(New SqlParameter(@pwd SqlDbTypeChar ))

commParameters(@pwdValue = TextBoxText

Dim dr As SqlDataReader

connOpen()

dr = commExecuteReader

If drRead Then

Session(stu_id) = TextBoxText

drClose()

commCancel()

Dim sql_ As String = update stu_base set point=point+ where stu_id=@stu_id

comm = New SqlCommand(sql_ conn)

commParametersAdd(New SqlParameter(@stu_id SqlDbTypeInt ))

commParameters(@stu_idValue = Session(stu_id

commExecuteNonQuery()

commCancel()

ResponseRedirect(detailaspx?stu_id= & Session(stu_id) &

Else

LabelText = 您还没有注册或账号密码错误

End If

End Sub

Private Sub Button_Click(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ButtonClick

TextBoxText =

TextBoxText =

End Sub

上一篇:VB.NET 中的组件开发源代码剖析

下一篇:vb.net字符串的操作应用