foreach Control ctrl in SomePanel.Controls does not get all controls

Posted by aron on Stack Overflow See other posts from Stack Overflow or by aron
Published on 2010-05-13T15:59:07Z Indexed on 2010/05/13 16:04 UTC
Read the original article Hit count: 569

Filed under:
|
|
|

Hello, I have a panel with a bunch of labeles and textboxes inside of it.

The code:

foreach (Control ctrl in this.pnlSolutions.Controls)

Seems to only be finding html table inside the panel and 2 liternals. But it does not get the textboxes that are in the html table. Is there a simple way to get all the controls inside of a panel regardless of the nesting?

thanks!

© Stack Overflow or respective owner

Related posts about controls

Related posts about c#