Reputation: 27
It shows error "Non-invocable member 'System.Web.UI.WebControls.RepeaterItem.DataItem' cannot be used like a method.
for the <%# Container.DataItem("CostPageDescription")%>
my code below,
<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>
Upvotes: 2
Views: 2925
Reputation: 18008
Use this:
<%# Eval("CostPageDescription") %>
or this:
<%# DataBinder.Eval(Container.DataItem, "CostPageDescription") %>
First one is just a simplification of the second.
Upvotes: 0
Reputation: 4596
USE LIKE THIS
<td> <%# eval("CostPageDescription")%></td>
and at one place u left it blank, so make that correct
Upvotes: 5