3

I need to find a child control in a Windows Forms panel. I was wondering if there is a method similar to Panel.FindControl() of the ASP.NET webforms panel in the .NET Windows Forms version.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Meli
  • 141
  • 2
  • 13
  • Possible duplicate of *[Find control by name from Windows Forms controls](http://stackoverflow.com/questions/3898588/find-control-by-name-from-windows-forms-controls)* – Peter Mortensen Oct 28 '15 at 13:07

1 Answers1

4

You can achieve like this:

mypanel.Controls.Find("mycontrolname",true);

The documentation is here: Control.ControlCollection.Find Method

Giorgi
  • 29,755
  • 12
  • 86
  • 122