DataList - Bind 5 records at a time from SQL Server ?

Discussion in 'ASP .Net Web Controls' started by Elliot Cohen, Nov 27, 2003.

  1. Elliot Cohen

    Elliot Cohen Guest

    I would like to retrieve 5 records (of products) at a
    time from an SQL Server database and display them in an
    ASP:DataList control (or possibly an ASP:Repeater
    control). I only want to display 5 records at a time on
    each web page. The user will be able to see more products
    by navigating to the next 5 items etc in a similar way to
    how users navigate on search engine results. The user
    will also be able to select which order the items will be
    displayed in according to different criteria (model
    number, price etc.).

    My main problem is, what is the most efficient way to
    obtain records n to n+5 and bind them to a datalist
    control? Ideally I would like to write a stored procedure
    to extract just those records and then I will attach them
    to a DataReader object which I could then bind to the
    DataList control. But how can I obtain just those 5
    records?

    TIA
    Elliot Cohen
    Messorah Software
     
    Elliot Cohen, Nov 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nevyn Twyll
    Replies:
    8
    Views:
    1,925
  2. Luke Airig
    Replies:
    0
    Views:
    813
    Luke Airig
    Dec 31, 2003
  3. =?Utf-8?B?QVNQIERldmVsb3Blcg==?=

    How do you bind a datalist that is inside a bound datalist

    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=, Sep 25, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    587
    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=
    Sep 26, 2006
  4. Dan

    Delete records or update records

    Dan, May 10, 2004, in forum: ASP General
    Replies:
    1
    Views:
    475
    Ray at
    May 10, 2004
  5. Replies:
    3
    Views:
    680
    Anthony Jones
    Nov 2, 2006
Loading...

Share This Page