Hi
If I want to bind the files of a folder to a gridview, I can just do this:
GridView1.DataSource = New DirectoryInfo("C:\MyPix").GetFiles
GridView1.DataBind()
...And this asp.net
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:BoundField DataField="Name" />
</Columns>
</asp:GridView>
...But if I want to bind it to a repeater in stead, I would think I could display the filename like this:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate><%#Container.DataItem("Name")%></ItemTemplate>
</asp:Repeater>
...But that gets me the error "No default member found for type 'FileInfo'."
What to do?