它显示错误“不可调用的成员'System.Web.UI.WebControls.RepeaterItem.DataItem'不能像方法一样使用。
对于 <%# Container.DataItem("CostPageDescription")%>
我的代码如下,
<td> Cost Page Description</td>
<td> Vendor Name</td>
<td> Bill Type</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td> <%# Container.DataItem("CostPageDescription")%></td>
<td> <%# Container.DataItem("VendorName")%> </td>
<td> <%# Container.DataItem("BillType") %> </td>
</tr>
<tr>
最佳答案
像这样使用
<td> <%# eval("CostPageDescription")%></td>
在一个地方你留空了,所以请正确填写
关于ASp.Net中继器控制: error showing on binding repeater,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17431667/