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

HasControls() public method

public HasControls ( ) : bool
return bool
		public virtual bool HasControls ()
		{
			return (_controls != null && _controls.Count > 0);
		}
		

Usage Example

Example #1
0
 internal Control FindChildControl(string strid, Control ct)
 {
     if (ct.ID == strid)
     {
         return ct;
     }
     else
     {
         if (ct.HasControls())
         {
             foreach (Control ctchild in ct.Controls)
             {
                 Control ctrtn = FindChildControl(strid, ctchild);
                 if (ctrtn != null)
                 {
                     return ctrtn;
                 }
             }
             return null;
         }
         else
         {
             return null;
         }
     }
 }
All Usage Examples Of System.Web.UI.Control::HasControls