KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code: <asp:ListView ID="lvDetail" runat="server"> <ItemTemplate> <tr> <td><%# Eval("ShpNo")%></td> <td><%# Eval("QtyShp")%></td> <td><%# Eval("NumPallets")%></td> </tr> </ItemTemplate> <LayoutTemplate> <table id="tbl1" runat="server"> <tr id="tr1" runat="server"> <td id="td1" runat="server">ShpNo</td> <td id="td2" runat="server">QtyShp</td> <td id="td3" runat="server">NumPallets</td> </tr> <tr id="ItemPlaceholder" runat="server"> </tr> </table> </LayoutTemplate> </asp:ListView> And in the code behind: List<Visibility> ListVisibility = new List<Visibility>(); public class Visibility { public int ShpNo; public int QtyShp; public int NumPallets; public string ETA; } List<Visibility> items = ListVisibility.FindAll(VisibItem => VisibItem.ETA == Calendar1.SelectedDate.ToShortDateString()); lvDetail.DataSource = items; lvDetail.DataBind(); but I'm getting the following error when binding: <td><%# Eval("ShpNo")%></td> DataBinding: 'AIS.WebVisibility+Visibility' does not contain a property with the name 'ShpNo'. What do I need to do in order to get the correct values
Tags (comma-separated)
Save Edits
Cancel