title: Eval binding object in asp.net
body: <p>I'm binding the ListView with the following code.</p>
  
  <pre><code>List&lt;intermediate&gt; order = new List&lt;intermediate&gt;();
  order = DBInteraction.GetAllActiveOrders();
  lvProducts.DataSource = order;
  lvProducts.DataBind();
  </code></pre>
  
  <p>my intermediate is as follow:</p>
  
  <pre><code>public class intermediate
  {
      public product pro = new product();
      public order ord = new order();
  }
  </code></pre>
  
  <p>now on frontend i'm binding the listview like:</p>
  
  <pre><code>&lt;asp:ListView runat="server" ID="lvProducts" OnItemCommand="lvProducts_ItemCommand"&gt;
  &lt;ItemTemplate&gt;
      &lt;tr&gt;
          &lt;td&gt;
          &lt;asp:Label runat="server" ID="lblID" Text='&lt;%# Eval(ord.oID) %&gt;'/&gt;
          &lt;/td&gt;...
  </code></pre>
  
  <p>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?</p>