熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

一個vb.net的用戶登陸頁面代碼

2022-06-13   來源: .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


From:http://tw.wingwit.com/Article/program/net/201311/13960.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.