title: How to solve error in ExecuteNonQuery() in asp.net
body: <p>Error:</p>
  
  <blockquote>
    <p>An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code</p>
    
    <p>Additional information: Column name or number of supplied values does not match table definition.</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>SqlConnection con = new SqlConnection();
  con.ConnectionString = @"Data Source = (LocalDB)\MSSQLLocalDB; AttachDbFilename = C:\Users\Harry\Documents\Visual Studio 2015\WebSites\WebSite2\App_Data\Database.mdf; Integrated Security = True";
  con.Open();
  
  // insert command 
  SqlCommand cmd = new SqlCommand();
  cmd.Connection = con;
  cmd.CommandText="INSERT INTO firsttb VALUES ( @n , @p ) ";
  cmd.CommandType = System.Data.CommandType.Text;
  cmd.Parameters.AddWithValue("@n",TextBox1.Text);
  cmd.Parameters.AddWithValue("@p", TextBox2.Text);
  
  cmd.ExecuteNonQuery();
  
  con.Close();
  </code></pre>