title: Binding a List<> to a listview in asp.net c#
body: <p>I have the following code:</p>
  
  <pre><code>&lt;asp:ListView ID="lvDetail" runat="server"&gt;
                      &lt;ItemTemplate&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;%# Eval("ShpNo")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%# Eval("QtyShp")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%# Eval("NumPallets")%&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/ItemTemplate&gt;
                      &lt;LayoutTemplate&gt;
                          &lt;table id="tbl1" runat="server"&gt;
                              &lt;tr id="tr1" runat="server"&gt;
                                  &lt;td id="td1" runat="server"&gt;ShpNo&lt;/td&gt;
                                  &lt;td id="td2" runat="server"&gt;QtyShp&lt;/td&gt;
                                  &lt;td id="td3" runat="server"&gt;NumPallets&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr id="ItemPlaceholder" runat="server"&gt;  
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/LayoutTemplate&gt;
                  &lt;/asp:ListView&gt;
  </code></pre>
  
  <p>And in the code behind:</p>
  
  <pre><code>List&lt;Visibility&gt; ListVisibility = new List&lt;Visibility&gt;();
      public class Visibility
      {
          public int ShpNo;
          public int QtyShp;
          public int NumPallets;
          public string ETA;            
      }
  
  List&lt;Visibility&gt; items = ListVisibility.FindAll(VisibItem =&gt; VisibItem.ETA == Calendar1.SelectedDate.ToShortDateString());
          lvDetail.DataSource = items;            
          lvDetail.DataBind();
  </code></pre>
  
  <p>but I'm getting the following error when binding:</p>
  
  <p><code>&lt;td&gt;&lt;%# Eval("ShpNo")%&gt;&lt;/td&gt;</code></p>
  
  <p><code>DataBinding: 'AIS.WebVisibility+Visibility' does not contain a property with the name 'ShpNo'.</code></p>
  
  <p>What do I need to do in order to get the correct values from the List?</p>