Just look at your code.
for (int i = 0; i < quantity; i++)
{
foreach (Control ctrl in this.Controls)
{
TextBox txtBox1 = new TextBox();
txtBox1.ID = "tb1" + i.ToString();
txtBox1.Text = txtBox1.Text;
PlaceHolder1.Controls.Add(txtBox1);
if (ctrl is TextBox)
{
con.Open();
string qryInsertProduct = "insert into Product_Details(GatePassNo,ClientID,Product_name,SerialNo,Status,CheckIN_Date ,Customer_Name, Customer_location) values('" + GatePassNo + "','" + clientID + "','" + productName + "','" + txtBox1.Text + "','" + status + "','" + TextBox1.Text + "','" + ddlCName.SelectedItem.Value + "','" + ddlCLocation.SelectedItem.Value + "')";
SqlCommand comInsertProduct = new SqlCommand(qryInsertProduct, con);
comInsertProduct.ExecuteNonQuery();
}
}
Here in loop you have created text box controls.Just followed by an insert statement.
You are assigning text to dynamically created text boxes by the code line
txtBox1.Text = txtBox1.Text;
Here both 'txtBox1.Text' are blank.That's why you are not getting any text value to insert.