title: validating password with uppercase and lowercase
body: <p>This is my password textbox aspx elements:</p>
  
  <pre><code>&lt;label for="password"&gt;Password&lt;/label&gt;
  &lt;asp:Text Box ID="User Password" runat ="server"  Text Mode ="Password" &gt;&lt;/asp:Text Box&gt;
  </code></pre>
  
  <p>This is my code behind</p>
  
  <pre><code>protected void LoginSubmit_Click(object sender, EventArgs e)
  {
      BOL ObjectBOL = new BOL();
      BAL ObjectBAL = new BAL();
      ObjectBOL.UserName_value = UserText.Text;
      ObjectBOL.UserPassword_value = UserPassword.Text;
  
      try
      {
  
          String Login = ObjectBAL.LoginBAL(ObjectBOL);
          int i = int.Parse(Login);
          if (i &gt; 0)
          {
              Response.Redirect("dashboard.aspx", false);
          }
          else
          {
              //UserText.Text = "";
              //UserPassword.Text = "";
              lblMsg.Text = (" Login Failed.... Try Again...");
          }
      }
      catch (Exception LoginException)
      {
          throw LoginException;
      }
      finally
      {
          ObjectBAL = null;
      }
  }
  </code></pre>
  
  <p>When the user enters the password in upper case or lower case letters it was accepting the value and redirecting to the next page. </p>
  
  <pre><code> SqlCommand cmd = new SqlCommand ("select  count (*) from UserTable where User_Name='" + Login.UserName_value +
                      "'and User_Password='" + Login.UserPassword_value + "'", con);
                  string str = cmd.ExecuteScalar().ToString();
                  return str;
  </code></pre>