Control collection
C#
3
Posts
2
Posters
1
Views
1
Watching
-
hi friends how can i get a collection of the names if textboxes on a panel control please i need practical examples
-
hi friends how can i get a collection of the names if textboxes on a panel control please i need practical examples
ArrayList names = new ArrayList(); foreach(Control ctrl in myPanel.Controls) { if(ctrl is Textbox) { names.Add(ctrl.Name); } }
Roger Stewart "I Owe, I Owe, it's off to work I go..."
-
ArrayList names = new ArrayList(); foreach(Control ctrl in myPanel.Controls) { if(ctrl is Textbox) { names.Add(ctrl.Name); } }
Roger Stewart "I Owe, I Owe, it's off to work I go..."
thanks for your reply i think i need to know a lot about u my approach was about 4 lines of code but your reply has help me understand. i'm from ghana and working as a programmer with the softtribe