Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead.
The chances are that that will cure your problem at the same time.
Especially if you get rid of the spare quote before your open bracket:
string str = "INSERT INTO MyTable (dataid,data) VALUES (@DI, @DT)";
SqlCommand cmd = new SqlCommand(str,con);
cmd.Parameters.AddWithValue("@DI", textBox1.Text);
cmd.Parameters.AddWithValue("@DT", label2.Text);