title: Find Control() not working
body: <p>I have created 5 text boxes in a button click event and i have to get the values in the text boxes when the dynamically generated button is clicked.</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
   {
    for(int i=0;i&lt;5;i++)
    {
     HtmlGenericControl tr = new HtmlGenericControl("tr");
     HtmlGenericControl td = new HtmlGenericControl("td");
     HtmlGenericControl tdbtn = new HtmlGenericControl("td");           
     TextBox txt=new TextBox();
     txt.ID="txt_"+i.ToString();
     td.Controls.Add(txt);  
     Button btn=new Button();
     btn.ID="btn_"+i.ToString();
     btn.Click+=new EventHandler(btnpay_Click);
     btn.Text="Pay";    
     tdbtn.Controls.Add(btn);        
     tr.Controls.Add(td);
     tr.Controls.Add(tdbtn);
     PlaceHolder1.Controls.Add(tr);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But i couldn't get the Values in the text boxes at <strong>btnpay_Click</strong></p>
  
  <pre><code>protected void btnpay_Click(object sender, EventArgs e)
      {
  
          Button btn = new Button();
          btn = sender as Button;
          string[] splitvaues = btn.ID.Split('_');
          string identity = splitvaues[1];
          TextBox txt = new TextBox();
          txt =PlaceHolder1.FindControl("txt_" + identity) as TextBox;
  
  }
  </code></pre>
  
  <p>Can Anybody tell me a way to solve this problem?</p>