title: executescalar returning null value
body: <pre><code> string checkuserQuery = "select username from usersign where Username=' " + TextBox1.Text + " ' ";
   SqlCommand usercom = new SqlCommand(checkuserQuery, conn);
   string user1 = string.Empty;
   Object val = usercom.ExecuteScalar();
   if (val != null)
   {
       user1 = val.ToString();
       if (user1 == TextBox1.Text)
       {
  
           string checkpasswordQuery = "select password from usersign     where Username=' " + TextBox1.Text + " ' ";
           SqlCommand passcom = new SqlCommand(checkpasswordQuery, conn);
           string password = passcom.ExecuteScalar().ToString();
           if (password == TextBox2.Text)
           {
               Session["New"] = TextBox1.Text;
               Label5.Text = "password is correct";
               Response.Redirect("user.aspx");
           }
           else
           {
               Label5.Text = "password is not correct";
  
           }
  
       }
   }
   else
   {
       Label5.Text = "val is null";
   }
   }
  </code></pre>