私は本当に混乱しています.1日無駄にしましたが、まだ修正できません.(Repeater.ascx)Webユーザーコントロール(内部にRepeaterがある)を作成し、このようにaspxページ(Info.aspx)にドラッグします.
<uc1:Repeater runat="server" ID="Repeater" />
これはユーザー制御コードです。
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Repeater.ascx.cs" Inherits="DBG.Website.Billing.Repeater" %>
<asp:Repeater ID="repeaterInvoicesPaid" OnItemCommand="ClientNameClicked" runat="server">
<HeaderTemplate>
<table id="PaidInvoicesTable" cellspacing="0" cellpadding="0" style="width: 100%; font-size: 11px; border-right-width: 0; border-bottom-width: 0;"
class="dxgvControl grid dxgvTable">
<thead>
<tr>
<td style="width: 150px;" class="dxgvHeader">Invoice #
</td>
<td style="width: 150px;" class="dxgvHeader">Client Name
</td>
<td style="width: 150px;" class="dxgvHeader">Invoice Date
</td>
<td style="width: 150px;" class="dxgvHeader">Due Date
</td>
<td style="width: 150px;" class="dxgvHeader">Total
</td>
<td style="width: 150px;" class="dxgvHeader">Payment Method
</td>
<td style="width: 150px;" class="dxgvHeader">Status
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
<tr class="dxgvDataRow">
<td class="dxgv">
<asp:Label ID="lblInvoiceID" Text='<%#Eval("InvoiceID")%>' runat="server" />
</td>
<td class="dxgv">
<asp:LinkButton ID="btnClientName" CommandName="NameClicked" Text='<%#Eval("ClientName")%>' CommandArgument='<%#Eval("InvoiceReapterCustomerID") %>' runat="server"/>
</td>
<td class="dxgv">
<asp:Label ID="lblAddedDate" Text='<%#Eval("AddedDateAndTime")%>' runat="server" />
</td>
<td class="dxgv">
<asp:Label ID="lblCloseDate" Text='<%#Eval("CloseDateOnly") %>' runat="server" />
</td>
<td class="dxgv">
<asp:Label ID="lblRecurringCharge" Text='<%#Eval("RecurringCharge") %>' runat="server" />
</td>
<td class="dxgv">
<asp:Label ID="lblPaymentMethodID" Text='<%#Eval("PaymentMethodIDInvoices")%>' runat="server" />
</td>
<td class="dxgv">
<asp:Label ID="lblStatus" ForeColor="Green" Text=' <%#Eval("StatusType") %>' runat="server" />
</td>
<td class="dxgv">
<asp:Label ID="lblCustomerid" Visible="false" Text=' <%#Eval("InvoiceReapterCustomerID") %>' runat="server" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
今私の問題は、info.csファイル内のWebユーザーコントロールのリピーターをバインドしたいのですが、info.csでユーザーコントロールとリピーターIDを取得してバインドする方法がわかりません。
注: info.cs のメソッドから返された datasource(List) でリピーターをバインドする必要があります。
助けてください 。ありがとうございました。