自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

VB.NET用戶登錄頁面實現(xiàn)技巧分享

開發(fā) 后端
在用戶登錄頁面的實現(xiàn)上,開發(fā)人員可以使用VB.NET這門語言來輕松的實現(xiàn)。在這里大家將會會了解到VB.NET用戶登錄頁面的具體實現(xiàn)方法。

VB.NET的應(yīng)用方式比較簡單靈活,大多數(shù)開發(fā)人員在剛接觸這門語言不久后就被他的靈活易用,功能強大等特點深深吸引住了。我們今天將會為大家介紹的實用技巧是VB.NET用戶登錄頁面的實現(xiàn)方法,希望能給大家?guī)硪恍椭?/p>

VB.NET用戶登錄頁面代碼示例:

  1. Private Sub Button2_Click(ByVal 
    sender As System.Object, ByVal e 
    As System.EventArgs) Handles 
    Button2.Click   
  2. If TextBox3.Text = "" Or
     
    TextBox4.Text = "" Then   
  3. Label35.Text = "請確認(rèn)您的輸入!"   
  4. Return   
  5. End If   
  6. Dim sql As String = "select * 
    from pwd where stu_id=@stu_id 
    and pwd=@pwd"
       
  7. Dim comm As SqlCommand = New 
    SqlCommand(sql, conn)   
  8. comm.Parameters.Add(New SqlParameter
    ("@stu_id", SqlDbType.Int, 4))   
  9. comm.Parameters("@stu_id").Value = 
    TextBox3.Text   
  10. comm.Parameters.Add(New SqlParameter
    ("@pwd", SqlDbType.Char, 16))   
  11. comm.Parameters("@pwd").Value = 
    TextBox4.Text   
  12. Dim dr As SqlDataReader   
  13. conn.Open()   
  14. dr = comm.ExecuteReader   
  15. If dr.Read Then   
  16. Session("stu_id") = TextBox3.Text   
  17. dr.Close()   
  18. comm.Cancel()   
  19. Dim sql_3 As String = "update 
    stu_base set point=point+1
     where stu_id=@stu_id"
       
  20. comm = New SqlCommand(sql_3, conn)   
  21. comm.Parameters.Add(New SqlParameter
    ("@stu_id", SqlDbType.Int, 4))   
  22. comm.Parameters("@stu_id").
    Value
     = Session("stu_id")   
  23. comm.ExecuteNonQuery()   
  24. comm.Cancel()   
  25. Response.Redirect("detail.aspx?
    stu_id='" & Session("stu_id") & "'")   
  26. Else   
  27. Label35.Text = "您還沒有注冊或賬號密碼錯誤"   
  28. End If   
  29. End Sub    
  30. Private Sub Button1_Click(ByVal 
    sender As System.Object, ByVal e As 
    System.EventArgs) Handles Button1.Click   
  31. TextBox1.Text = ""   
  32. TextBox2.Text = ""   
  33. End Sub  

VB.NET用戶登錄頁面相關(guān)實現(xiàn)方法就為大家介紹到這里。

【編輯推薦】

  1. VB.NET加密文件實現(xiàn)技巧分享
  2. VB.NET數(shù)組賦值怪異現(xiàn)象揭秘
  3. VB.NET自定義屬性應(yīng)用方式解析
  4. VB.NET異常迭代捕捉代碼示例
  5. VB.NET共享成員變量創(chuàng)建技巧解析
責(zé)任編輯:曹凱 來源: pcppc.cn
相關(guān)推薦

2010-01-18 16:33:57

VB.NET加密文件

2010-01-18 18:50:26

VB.NET鼠標(biāo)手勢

2010-01-18 10:26:19

VB.NET中心旋轉(zhuǎn)圖

2010-01-14 16:04:32

VB.NET顯示時間

2010-01-07 13:40:50

VB.NET讀取XML

2010-01-22 11:02:30

VB.NET創(chuàng)建新變量

2010-01-13 15:52:59

VB.NET浮動窗體

2010-01-15 19:04:09

2010-01-22 13:16:05

VB.NET初始化數(shù)組

2010-01-11 15:31:04

VB.NET拖動窗體

2010-01-13 16:45:44

VB.NET刪除控件

2010-01-08 18:31:45

VB.NET歷史菜單

2010-01-07 10:02:53

Flash控制VB.N

2010-01-22 16:27:19

VB.NET關(guān)于對話框

2010-01-19 15:30:44

VB.NET比較運算符

2010-01-15 19:24:42

2010-01-13 10:25:30

VB.NET文件夾操作

2010-01-11 16:04:10

VB.NET使用wit

2010-01-08 18:37:08

VB.NET顯示圖片

2010-01-13 14:41:18

VB.NET列出目錄內(nèi)
點贊
收藏

51CTO技術(shù)棧公眾號