title: login in vb.net and sql server 2008
body: <p>How I'm going to redirect to another page after login is successful ?
  and how I'm going to check if the username &amp; password are correct or not ?</p>
  
  <p>this is my code for login :</p>
  
  <pre><code>Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
  
     If txtUser.Text = "" Then
          MsgBox("Please Enter The Username !", MsgBoxStyle.OkOnly)
  
      ElseIf txtPass.Text = "" Then
          MsgBox("Please Enter The Password !", MsgBoxStyle.OkOnly)
  
  
      End If
  
      Dim connectionString As String = "server=''; user id=''; password=''; Database=''"
      Dim conLogin As SqlClient.SqlConnection = New SqlClient.SqlConnection(connectionString)
  
      Dim queryString As String = "SELECT login VALUES " _
      &amp; "(@username, @password) "
  </code></pre>