title: Unclosed quotation mark after the character string '
body: <p>I'm working on Datagrid tool in web form. I 
  have added Edit button, but whenever I update data I getting the error:</p>
  
  <blockquote>
    <p>An exception of type 'System.Data.SqlClient.SqlException' occurred in </p>
    
    <p>System.Data.dll but was not handled in user code</p>
    
    <p>Additional information: Unclosed quotation mark after the character
     string ',Computer=System.Web.UI.WebControls.TextBox where rollno=1'.</p>
  </blockquote>
  
  <p>and below is the code that I have written in UpdateCommand Event of DataGrid</p>
  
  <pre><code>TextBox txtName = (TextBox)e.Item.Cells[1].Controls[0];
  TextBox txtEnglish = (TextBox)e.Item.Cells[2].Controls[0];
  TextBox txtComputer = (TextBox)e.Item.Cells[3].Controls[0];
  string strSQL = "update student set Name='" + txtName.Text + "',English=" + txtEnglish + "',Computer=" + txtComputer + " where rollno=" + DataGrid1.DataKeys[e.Item.ItemIndex].ToString();
  SqlCommand mycmd = new SqlCommand(strSQL, mycon);
  mycon.Open();
  mycmd.ExecuteNonQuery();
  mycon.Close();
  DataGrid1.EditItemIndex = -1;
  FullupGrid();
  </code></pre>