System.Web.UI.UpdatePanel.Initialize C# (CSharp) Method

Initialize() protected method

protected Initialize ( ) : void
return void
		protected internal virtual void Initialize ()
		{
			if (_triggers == null || _triggers.Count == 0 || !ScriptManager.SupportsPartialRendering)
				return;

			_triggers.Initialize ();
		}

Usage Example

Example #1
0
        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();
            }
        }