public List <EditorControl> FindControls(string ctrlName) { FindControlByNameVisitor finder = new FindControlByNameVisitor(); finder.name = ctrlName; if (rootCtrl != null) { rootCtrl.Traverse(finder); } return(finder.results); }
public EditorControl FindControl(string ctrlName) { FindControlByNameVisitor finder = new FindControlByNameVisitor(); finder.name = ctrlName; if (rootCtrl != null) { rootCtrl.Traverse(finder); } if (finder.results.Count > 0) { return(finder.results[0]); } return(null); }