Here’s a useful (well maybe) block of code to determine what thread controls are running in.
Note that this code was placed in a base class (hence the 1s on the stack frame to show callers etc).
protected override void CreateChildControls()
{
var stack = new StackTrace();
var message = string.Format(
CultureInfo.InvariantCulture,
"THREAD ID: {0}, CLASSNAME: {1}, METHOD: {2}",
Thread.CurrentThread.ManagedThreadId,
stack.GetFrame(1).GetMethod().ReflectedType.FullName,
stack.GetFrame(1).GetMethod().Name);
Debug.WriteLine(message);
}