このチュートリアルを使用して、リピーターを使用してプロジェクトのページに名前のリストを表示しました。
だから私は動的データを使用しており、私の aspx.cs ページには次のものがあります。
List<string> subContractors = new List<string>();
Context db = new Context();
subContractors = (from SUBContractors in db.BOQ_SubContractors
where SUBContractors.Bill_Of_Quantity_id == this.boqId
select SUBContractors.Sub_Contractor.Company_Name).ToList();
repeaterShowSubContractorName.DataSource = subContractors; repeaterShowSubContractorName.DataBind();
私のaspxで:
<asp:Repeater ID="repeaterShowSubContractorName" runat="server" OnItemDataBound="subContractors_ItemDataBound">
<HeaderTemplate>
<table>
<tr>
<th>
<asp:Label ID="SubConName" Text="SubContractor Name" runat="server"></asp:Label>
</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="SubCon" Text='<%# Eval("subContractors") %>' runat="server"></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
エラーはから来ていOnItemDataBound="subContractors_ItemDataBound"
ます。
これを何に、またはどこにリンクしますか? subContractors_ItemDataBound
現時点ではありません。