Language:

Rekursive Suche nach Controls auf ASP.NET Seiten

Language: Deutsch
Programming Language: C#
Published by: Kai
Last Update: 4/13/2006
Views: 604

Description

Rekursive Suche nach Controls auf ASP.NET Seiten anhand der ID der Controls

Code

1 public static Control FindControlRecursive(Control root, string id) 2 { 3 if (root.ID == id) 4 return root; 5 6 foreach (Control c in root.Controls) 7 { 8 Control t = FindControlRecursive(c, id); 9 if (t != null) 10 return t; 11 } 12 13 return null; 14 }

No comments avaiable

Add a comment

Name *  

Email (won't be displayed) *    

Website  

Comment *  

Sicherheitscode Security Code *    

RSS