ASP.Net add postbacktrigger for usercontrol's element run-time
<p>i have PlaceHolder in which i loads runtime some usercontrols.</p>

<pre><code>&lt;asp:UpdatePanel ID="UpdatePanel_Items" runat="server"&gt;
                        &lt;ContentTemplate&gt;   
                            &lt;asp:PlaceHolder ID="PlaceHolder_Main" runat="server"&gt;&lt;/asp:PlaceHolder&gt;
                        &lt;/ContentTemplate&gt;
</code></pre>

<p>user control has element</p>

<pre><code>&lt;asp:LinkButton ID="LinkButton_AddToCart" runat="server" OnClick="LinkButton_AddToCart_Click" CausesValidation="false"&gt;&lt;/asp:LinkButton&gt;
</code></pre>

<p>After adding user controls to placeholder, i need to add postback trigger for LinkButton_AddToCart in every user control .
i tried this:</p>

<pre><code>foreach (Control item in PlaceHolder_Main.Controls)
        {
            try
            {
                WUC_Rim wuc = (WUC_Rim)item;
                PostBackTrigger trigger = new PostBackTrigger();                    
                LinkButton lnk = wuc.GetLinkButton_AddToCart();
                trigger.ControlID = lnk.UniqueID;    
                UpdatePanel_Items.Triggers.Add(trigger);
            }
            catch 
            {

            }            
        }
</code></pre>

<p>but has an error</p>

<p>A control with ID 'ctl00$MainContent$ctl02$LinkButton_AddToCart' could not be found for the trigger in UpdatePanel 'UpdatePanel_Items'. </p>
