title: How to insert data into SQL Server with other form values (addwithvalue)
body: <p>I have this code:</p>
  
  <pre><code>con.Open();
  
  SqlCommand cmd = new SqlCommand("INSERT INTO fiscal(itemcode, itemname, price) 
        SELECT itemcode, itemname, price FROM inventorymaster
        WHERE itemcode = '" + textBox1.Text + "'", con);
  
  cmd.Parameters.AddWithValue("@username", label1.Text);
  
  cmd.ExecuteNonQuery();
  
  con.close();
  </code></pre>
  
  <p>Why doesn't this code work? Actually it doesn't insert my <code>label1.Text;</code></p>