Multiple Listviews IDs confusion
<p><code>enter code here</code>I am building user controls to display items in listviews with pagers. If I have only one usercontrol (SharePoint 2010 webpart), it is perfectly working with the following code :</p>

<p>ASCX :</p>

<pre><code>        &lt;asp:ListView ID="ListView" runat="server"&gt;
        &lt;LayoutTemplate&gt;
            &lt;table id="table"&gt;
                &lt;tr id="tableRow"&gt;
                    &lt;td id="column1" class="tableCell"&gt;
                        &lt;div runat="server" id="itemPlaceholder"&gt;
                        &lt;/div&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/LayoutTemplate&gt;
        &lt;ItemTemplate&gt;
            ...
        &lt;/ItemTemplate&gt;
    &lt;/asp:ListView&gt;
    &lt;div class="pager"&gt;
        &lt;asp:DataPager ID="DataPager" PagedControlID="ListView" runat="server"&gt;
            &lt;Fields&gt;
                &lt;asp:NextPreviousPagerField ShowFirstPageButton="False" ShowNextPageButton="False"
                    ShowPreviousPageButton="true" PreviousPageText="&lt;" RenderDisabledButtonsAsLabels="True" /&gt;
                &lt;asp:NumericPagerField /&gt;
                &lt;asp:NextPreviousPagerField ShowLastPageButton="False" ShowPreviousPageButton="False"
                    ShowNextPageButton="true" NextPageText="&gt;" RenderDisabledButtonsAsLabels="True" /&gt;
            &lt;/Fields&gt;
        &lt;/asp:DataPager
&lt;/div&gt;
</code></pre>

<p>Code behind :</p>

<pre><code>                DataPager.PageSize = X;
                ListView.DataSource = items.ToList();
                ListView.DataBind();
</code></pre>

<p>The problem is when I put two of these ascx on my page, all the items are going to the first listview : of course because they don't have a different ID. But how could I give them a different ID as I cannot know, in advance, how many user controls I will have ?</p>
