internal void RegisterUpdatePanel(UpdatePanel updatePanel) { Debug.Assert(updatePanel != null); if (_allUpdatePanels == null) { _allUpdatePanels = new List <UpdatePanel>(); } Debug.Assert(!_allUpdatePanels.Contains(updatePanel), String.Format(CultureInfo.InvariantCulture, "The UpdatePanel with ID '{0}' has already been registered with the ScriptManager.", updatePanel.ID)); _allUpdatePanels.Add(updatePanel); if (_panelsInitialized) { // Do catch-up for panels that may have been added later in // the lifecycle during an async post. Debug.Assert(_owner.IsInAsyncPostBack, "Catch-up initialization should only be done in async posts."); updatePanel.Initialize(); } }