SIGN UP MEMBER LOGIN:    
Resource

Find the Child Control in the Root Control

Hemant Kumar Resources Nov 23, 2011
Many times we faced a problem in finding the child control in the root control.


The recursive function in order to loop the Parent Control's is given below
private Control FindControlRecursive(Control root, string id)
{
     if (root.ID == id)
    {
         return root;
    }

    foreach (Control c in root.Controls)
    {
          Control t = FindControlRecursive(c, id);
         if (t != null)
        {
             return t;
        }
    }

     return null;
}

share this resource :
post comment
 

Nice Post: Finding a child control in root, always gives me trouble, so i am also using the similar way and already shared my code in my blog. you can also visit the same at: http://www.codinghub.net/2011/08/c-how-to-find-all-textbox-in-winform.html

Posted by James Veronica Nov 30, 2011
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Sponsored by
Nevron Gauge for SharePoint
Become a Sponsor