You can use the code what
Member 9332883555 is given.
you can try this query part too.
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "INSERT INTO stuhob(StuID,HobID) VALUES (@StuID,@HobID)";
cmd.Parameters.AddWithValue("@StuID",txtStuID.Text);
cmd.Parameters.AddWithValue("@HobID",chHobbies.Items[i].Text );
cmd.ExecuteNonQuery();