>From: "Linday Bakharia" <lindsay_bakharia@h...>
>Reply-To: "ASP Databases" <asp_databases@p...>
>To: "ASP Databases" <asp_databases@p...>
>Subject: [asp_databases] FOR....LOOP
>Date: Sat, 16 Feb 2002 13:43:26
>
>Hi,
>
>I am building a data driven Survey application. It's a long survey (100
>questions) and I would like to display 5 questions on each page. I was
>sucessfully written a page that could display all the questions and values
>on the web. I know a For....Loop would do it but since I am new to asp,
>it's like a pain in neck.
>
>I would appreciate if you can give me a line of code or a site where I can
>learn how to do this.
Solution
if u r using recordset object
then
rs.pagesize=5
rs.open" Query"
rowcount=0
page_count=rs.pagecount
while rs.eof() and rowcount<pagesize
'display records
rs.movenext
rowcount=rowcount+1
wend
u can do paging using buttons
>
>
>
>$subst('Email.Unsub').
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx