method 1:
 make TextBox tb as a member varialbe of your formmethod 2:
  在另外一个按钮的单击事件中, look through pan.Controls collection:foreach (Control c in pan.Controls)
{
   if (c is TextBox)
   {
      MessageBox.Show(((TextBox)c).Text);
   }
}
method 3:
if you have a lot of dynamic controls, try something likeclass YourForm : Form
{
  //member variable
  Hashtable m_ht = new Hashtable();...
TextBox tb = new TextBox();
tb.Name = "mytb";
m_ht[tb.Name] = tb;pan.Controls.Add(tb);
Label lb = new Label();
pan.Controls.Add(lb);在另外一个按钮的单击事件中,
TextBox tb = (TextBox)m_ht["mytb"];
MessageBox.Show(tb.Text);