ASP.NET Loading a User Control in a Repeater
<p>I have a Repeater control that loads instances of a custom control I have built. This repeater looks like this:</p>

<pre><code>&lt;asp:Repeater ID="myRepeater" runat="server" OnLoad="myRepeater_Load"&gt;
  &lt;HeaderTemplate&gt;
    &lt;table border="0" cellpadding="0" cellspacing="0"&gt;
  &lt;/HeaderTemplate&gt;

  &lt;ItemTemplate&gt;
    &lt;tr&gt;&lt;td&gt;&lt;my:CustomControl ID="myControl" runat="server" 
      OnLoad="myControl_Load" /&gt;
    &lt;/td&gt;&lt;/tr&gt;
  &lt;/ItemTemplate&gt;

  &lt;FooterTemplate&gt;
    &lt;/table&gt;
  &lt;/FooterTemplate&gt;
&lt;/asp:Repeater&gt;
</code></pre>

<p>I bind to the Repeater through the myRepeater_Load event handler. My custom control is used to render an item within the Repeater. Because of this, I am trying to set properties on the custom control during the myControl_Load event handler. However, I do not know how to access the current item during the myControl_Load event.</p>

<p>Is there a way I can pass along the current item or access the current item during the myControl_Load event? If so, how?</p>

<p>Thank you,</p>
