Whats the best way to find and iterate through a group of controls on the page?
This is what i've been doing, but it seems wrong...
I want to grab all Children which are of type MyPage and do whatever...
foreach (Control c in Controls) {
if (c is Panel) {
foreach (Control p in c.Controls) {
if (p is MyPage) {
foreach (Control r in p.Controls) {
if (r is ProgressBar) {
((ProgressBar)r).Text = this.UpdateProgress();
}
}
}
}
}
}
Is this the right or wrong way to do this?
Thanks,
Steve
...
Go to the complete details ...