在Windows窗体面板中查找控件

时间:2010-06-03 17:34:06

标签: .net asp.net winforms webforms ironpython

我需要在Windows窗体面板中找到子控件。我想知道是否有一个类似于.NET Windows Forms版本的ASP.NET webforms面板的Panel.FindControl()的方法。

1 个答案:

答案 0 :(得分:4)

你可以这样做:

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

文档在这里:Control.ControlCollection.Find Method