title: Sql error in asp.net c#
body: <p>If you please help me out i have an error in my code that i can not understand it. </p>
  
  <p>the error is:</p>
  
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <p>Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'Login'.</p>
  
  <p>and my code:</p>
  
  <pre><code> public static void ChangePassword(string login, string password)
      {
          var sqlCon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
          string query = @"update Organizer set Password ="+ password + "where Login=" + login + "";
          SqlCommand cmd = new SqlCommand(query, sqlCon);
          cmd.CommandType = CommandType.Text;
          try
          {
              sqlCon.Open();
              cmd.ExecuteNonQuery();
              sqlCon.Close();
          }
          catch (Exception ee) { throw ee; }
      }
  </code></pre>