As stated in the previous solution, the problem is the missing single quotes.
However, the correction is to properly use parameters (see
SqlParameter[
^]).
So the code should be something like:
SqlCommand cmd = new SqlCommand("select * from profile where name LIKE @name" , cnn);
cmd.Parameters.Add("@name", SqlDbType.VarChar, 100).Value = string.Format("%{0}%", TextBox1.Text);
...
Without using parameters, you will be open to SQL injections, illegal character problems (single quote for example) etc.