I made the following at the end of the BuildControlHierarchy:
...
if (DesignMode || Page == null) return;
var sm = ScriptManager.GetCurrent(Page);
if (sm == null)
{
throw new MissingFieldException("The ScriptManager is needed on the page!");
}
sm.RegisterAsyncPostBackControl();