title: How can I get inside event_Click from instance of UserControl that created dynamicly from Button?
body: <p><strong>I have UserControl:</strong></p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wControl1.ascx.cs" Inherits="TestProjectSite.wControl1" %&gt;
  &lt;asp:Button ID="Button12" runat="server" Text="Button12" onclick="Button12_Click" OnClientClick="true" /&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>        public string Name { get; set; }
          protected void Page_Load(object sender, EventArgs e)
          {
              Button12.Text = Name;
  
          }
  
          protected void Button12_Click(object sender, EventArgs e)
          {
              //...
              //The problem is here... it doesn't get inside...
          }
  </code></pre>
  
  <p>And <strong>Page .ASPX:</strong></p>
  
  <pre><code>&lt;p&gt;
      &lt;asp:TextBox ID="TextBox1" Width="500" Height="34" runat="server" 
          Font-Size="22px"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:Button ID="Button2" runat="server" Height="32" Text="חפש..." 
          OnClick="Button2_Click" Font-Size="20px" /&gt;
  &lt;/p&gt;
  &lt;P&gt;
  &lt;asp:PlaceHolder ID="plhItems" runat="server" &gt;
  &lt;/P&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
          protected void Button2_Click(object sender, EventArgs e)
          {                 
              Func(TextBox1.Text);
          }
  
          public void Func(string text)
          {                      
                      wControl1 eControl = (wControl1)Page.LoadControl("wControl1.ascx");
                      eControl.Name = text;
  
                      plhItems.Controls.Add(eControl);
          }
  </code></pre>
  
  <p>The problem is in the event of Button12_Click.</p>
  
  <p>the instance of the control is created when i press the button(Button2).
  but when i press again in the button of UserControl(wControl) he doesn't go to codeBehind eventClick....   only if I use the create of the userControl in Page_Load event it will be OK.. but I want it from the event of Button2...</p>
  
  <p>What can I do??   </p>
  
  <p>THANKS..</p>