1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to display large amount of data in datalist in asp.net using C#?

Discussion in 'C#' started by DevAdelicia, Nov 29, 2011.

  1. #1
    Hello friends,


    how to display large amount of data in data-list in asp.net using C# ??

    please advise us...




    Thanks

    Adelicia
    SEMrush
     
    DevAdelicia, Nov 29, 2011 IP
    SEMrush
  2. redpro

    redpro Banned

    Messages:
    226
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #2
    Hi,

    Datalist is a databound control in which data is stored in multiple colums and in different formats.

    Thanks..
     
    redpro, Dec 12, 2011 IP
  3. Jesse12

    Jesse12 Member

    Messages:
    360
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #3
    we have to add a few tags on the .aspx design page to place where we want the DataList control to display its bound data without any issue of amount of data you have to show. Inside of the main DataList tag, we use the <HeaderTemplate> tag to specify the column titles for our repeated data and the <ItemTemplate> tag to specify what HTML tags can go around that repeated data (in this case, <td> tags surround each item). So, the front end .aspx page looks something like this:

    <td align="center" bgcolor="#FFFFFF">
    <asp:DataList ID="dlExample" runat="server" CssClass="basix" GridLines="Both">
    <HeaderTemplate>
    <td>First Name</td>
    <td>Last Name</td>
    <td>Hire Date</td>
    </HeaderTemplate>
    <ItemTemplate>
    <td><%# DataBinder.Eval(Container.DataItem,"firstname") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"lastname") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"hiredate") %></td>
    </ItemTemplate>
    </asp:DataList>
    <asp:label ID="lblStatus" runat="server"></asp:label></td>
     
    Last edited: Dec 16, 2011
    Jesse12, Dec 16, 2011 IP