Hi!,
I have defined a List like this List Container class holds my Item object and it's state as a Enum.
Person.Name
Person.DOB
I would like to bind it to ListView.
lv.DataSource = list;
lv.DataBind();
<asp:ListView runat="server" ID="lvPersons">
<LayoutTemplate>
<ul runat="server" id="ulPersons">
<li runat="server" id="itemPlaceHolder">
</li>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li runat="server" id="Person">
<asp:LinkButton runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name")%>'></asp:LinkButton>
</li>
</ItemTemplate>
</asp:ListView>
Can i follow this approach?