动态创建控件并显示在窗体上的panel上
第一次能正常赋值并显示所赋值
第二次却不能正常赋值并显示所赋值
解决办法:
foreach (Control cl in this.panel_Button.Controls)
{
if (cl.GetType() == typeof(System.Windows.Forms.TextBox))
{
if (cl.Name == "txtBox08")//根据控件名称查找并赋值
{
cl.Text =frm.SelectDpID ;
}
}
}