Get user controls from form.Controls???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a situation where I need to iterate through a forms controls
collection and I need to do special processing on any control that is a user
control. At run-time I won't know the names of the user controls.

Is there an easy way to tell if a control is a user control while iterating
through a controls collection?

Cheers!
 
I have a situation where I need to iterate through a forms controls
collection and I need to do special processing on any control that is a user
control. At run-time I won't know the names of the user controls.

Is there an easy way to tell if a control is a user control while iterating
through a controls collection?

if (ctl is UserControl) {
...
}

bye
Rob
 
Back
Top