I am populating a DataTable using ADO.NET and binding a DataList and it works. But when I try to extract only 10 records using Linq from DataTable as shown below, my code gives an error:
var xx=dt.asEnumerable().take(10).tolist();
dglist.datasource=xx;
dglist.databind();
<asp:DataList ID="dglist" runat="server" 
    RepeatColumns="4" RepeatDirection="Horizontal" 
    RepeatLayout="Table" CellPadding="1">
    <ItemTemplate>
        <div>
           <asp:Image runat="server" id="Image1" 
                 src='<%# Eval("photos") %>'  BorderWidth="0"
                 alt="" style="width:300px;height:300px;display:block;"/>
        </div>
    </ItemTemplate>
</asp:DataList>
My DataTable has one column called "photos". I am getting an error when I bind to a DataList. Please guide me on how I can use Linq to extract 10 records from DataTable and bind DataList with 10 records.
I have another question.
What does datatable.asEnumerable() mean and what it does do? It seems to convert a DataTable by asEnumerable() but to what?