Test if two samples are equal I have two samples, say sample A and B, and a negative control. 
I expect that the sample A to be different than the negative control, so I use a t-test to check for that. 
Then, I expect sample B not to be different from the negative control. How do I test for that? I could use a t-test for that too and treat a high p value as confirmation, but I'm wondering if there is a better way?
 A: One way to approach this question is called “equivalence testing”. You can look up information on that but generally speaking you cannot prove that two means are exactly equal (nor should you expect them to be in most cases) so you first have to define an equivalence margin (i.e. a difference that you consider negligible in practice).
Importantly, as Maarten already mentioned, a t-test is used to compare population means. It does not tell you if the two distributions are the same, if the difference is big, if there is a lot of overlap or anything like that buy only if the observed difference in means is likely to have come about purely through sampling variability. It also does not test if samples are different (to determine that, you just need to look at your data directly). The whole point of statistical inference is that your sample is a noisy representation of a broader population. Generally speaking, you should not expect statistics to tell you if something is “true” or “real” but only to help you deal with random variation.
A: You design your study to have sufficient "statistical power" to detect a meaningful difference. This requires that you pre-specify the size of a difference between the "negative control" and treatment B that you would consider "small" or unimportant. You then back-calculate to see how probable it would be to find a null result (fail to reject the null) if the true value is at least that large. You want the probability to be small and you choose your sample size to make it sufficiently small, If the design goal of testing similarity of treatment B to the control is an importance design criterion, it would be wise to make the probability of such a failure 10% or lower. You would then say you have 90% "power" to detect an important difference. There are many places you can find formulas to calculate this sample size, although for complex designs where you may be controlling for confounding factors, it may require simulation.
