How do I bind a List to a in ASP.NET 3.5
<asp:ListView ID="lvDiagnosisCodes" runat="server">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li>
<%# Eval("Name") %>
</li>
</ItemTemplate>
</asp:ListView>
I am not too sure what do use in the Eval part. Since this is a generic List of string , there is no column name.
Thanks in advance.
Don't use Eval. Bind it directly:
<%# Container.DataItem %>