I'm binding the ListView with the following code.
List<intermediate> order = new List<intermediate>();
order = DBInteraction.GetAllActiveOrders();
lvProducts.DataSource = order;
lvProducts.DataBind();
my intermediate is as follow:
public class intermediate
{
public product pro = new product();
public order ord = new order();
}
now on frontend i'm binding the listview like:
<asp:ListView runat="server" ID="lvProducts" OnItemCommand="lvProducts_ItemCommand">
<ItemTemplate>
<tr>
<td>
<asp:Label runat="server" ID="lblID" Text='<%# Eval(ord.oID) %>'/>
</td>...
same with Eval("ord.oID"). its throwing exception: The name 'ord' does not exist in the current context. How to bind such object? is i'm on right path?