C#获取tabControl里 textbox控件ID

解决方案 »

  1.   

     foreach (TabPage t in tabControl1.TabPages)
                {
                    foreach (Control c in t.Controls)
                    {
                        if (c is TextBox)
                        {
                            TextBox txt = c as TextBox;
                            MessageBox.Show(txt.Name);
                        }
                    }
                }