Note that there are some explanatory texts on larger screens.

plurals
  1. PODuplicate repeaters, identical UpdatePanels
    text
    copied!<p>Perhaps I'm making a faulty assumption here, but this has me stumped. I've got to set up two identical repeaters in two different places in the same control. I want to avoid changing the names of controls so I can use the same functions on the front end (and actually, if there's a better way to have two identical repeaters in two different places other than a straight copy and paste, that'd be great). But for simplicity's sake, I've broken down the two as follows:</p> <pre><code> &lt;asp:Repeater ID="rptTest" runat="server"&gt; &lt;ItemTemplate&gt; &lt;asp:UpdatePanel runat="server" ID="updTestPanel"&gt; &lt;ContentTemplate&gt; &lt;asp:TextBox ID="txtTest" runat="server" /&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:TextBox ID="txtTest2" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; &lt;asp:Repeater ID="rptTest2" runat="server"&gt; &lt;ItemTemplate&gt; &lt;asp:UpdatePanel runat="server" ID="updTestPanel"&gt; &lt;ContentTemplate&gt; &lt;asp:TextBox ID="txtTest" runat="server" /&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:TextBox ID="txtTest2" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; </code></pre> <p>Here's the thing: <code>txtTest2</code> is fine being repeated in both repeaters, but <code>txtTest</code> throws the following errors:</p> <blockquote> <p>Error 4 'txtTest' is already declared as 'Protected WithEvents txtTest As System.Web.UI.WebControls.TextBox' in this class.</p> <p>Error 5 'Private Overloads Function __BuildControltxtTest() As System.Web.UI.WebControls.TextBox' has multiple definitions with identical signatures.</p> <p>Error 8 'txtTest' is already declared as 'Protected WithEvents txtTest As System.Web.UI.WebControls.TextBox' in this class.</p> </blockquote> <p>Is there a way to do what I'm trying to do, or do I need to rethink how I'm calling in asynchronous data in the repeater?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload