protected void BtnSendToDatabase_Click(object sender, EventArgs e) { string strId = string.Empty; for (int count = 0; count < dt.Rows.Count; count++) { strId = strId + dt.Rows[count][0].ToString() + ", "; } SqlConnection conn = new SqlConnection(); conn.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlCommand cmd = new SqlCommand(); cmd.CommandText = "INSERT INTO Table1 (Company_Name) VALUES ('" + strId + "')"; cmd.Connection = conn; conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); }