System.Web.UI.Control.FillControlCache C# (CSharp) Method

FillControlCache() private method

private FillControlCache ( System.Web.UI.ControlCollection controls ) : void
controls System.Web.UI.ControlCollection
return void
		void FillControlCache (ControlCollection controls)
		{
			if (controls == null || controls.Count == 0)
				return;
			
			foreach (Control c in controls) {
				try {
					if (c._userId != null)
						_controlsCache.Add (c._userId, c);
				} catch (ArgumentException) {
					throw new HttpException (
						"Multiple controls with the same ID '" + 
						c._userId + 
						"' were found. FindControl requires that controls have unique IDs. ");
				}

				if ((c.stateMask & IS_NAMING_CONTAINER) == 0 && c.HasControls ())
					FillControlCache (c.Controls);
			}
		}