title: pass event handler to UserControl for assignment to dynamic LinkButton
body: <p>I have a public function in a UserControl that takes an EventHandler parameter and assigns it to a bunch of LinkButtons created at run time. The function being passed in the EventHandler is located on the form with the UserControl. A breakpoint defined in the callback function is not being reached, so I figured I'm doing something wrong.</p>
  
  <p><strong>Default.aspx</strong></p>
  
  <pre><code>&lt;uc1:tcControl runat="server" ID="tc1" /&gt;
  </code></pre>
  
  <p><strong>Default.aspx.cs</strong></p>
  
  <pre><code>tcControl1.ShowTags(new EventHandler(ClickHandler));
  </code></pre>
  
  <p>and</p>
  
  <pre><code>void ClickHandler(object sender, EventArgs e)
  </code></pre>
  
  <p><strong>tcControl.ascx.cs</strong></p>
  
  <pre><code>public void ShowTags(EventHandler handlerCallback)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>LinkButton lb = new LinkButton();
  lb.ID = t.Name.Replace(" ", "_");
  lb.Text = t.Name.Replace(" ", "&amp;nbsp;");
  lb.Click += handlerCallback;
  </code></pre>