Results 1 to 2 of 2

Thread: paging

  1. #1
    Join Date
    Dec 1969

    Default paging

    Hi I was woundering if someone could help me with this I have read and used the article from faq&#039;s section fo this site the number is #37 I belive any ways I have the code working so that it gets the records and pages through them but I want to display a number for each page whick works but i have 5000 records so it displays page 1 to 500 i want to display page 1-10 if the user clicks on page 2 it will display page 2-11 if the user clicks on the link for page 10 it will display 10-19 ect how would I do this I have been messing around with it for a few hours now and out of ideas any help would be great thanks.<BR>This is the code.<BR><BR>If Session ("NumPageDisplay") &#060; Page Then <BR> Session("NumPageDisplay") = Page + NumPageDisplay <BR> For i = page to Session("NumPageDisplay") <BR> if Recordcount &#062; 1 Then <BR> if cInt(Page) = Cint(Count) then<BR> Response.Write ("&#060;FONT style="" font-size:8.5pt; font-<BR> Family:Tahoma"" &#062;" & i & "&#060;/FONT&#062;&nbsp;")<BR> Count = Count + 1 <BR> Session("NumPageDisplay") = Page<BR> Else<BR> Response.Write ("&#060;A HREF=Blahasp?page=" & i & " style=&#039;font-size:8.5pt; font-family:Tahoma; text-decoration:none;&#039;&#062;" & i & "&#060;/A&#062;&nbsp;")<BR> Count = Count + 1<BR> Session("NumPageDisplay") = Page<BR> End if <BR> end if<BR>next

  2. #2
    Join Date
    Dec 1969

    Default RE: paging

    Hi,<BR> Just declare a variable say start. Set it to 1 if the page number is 1, else set it to the page number(I think you are getting the page number as querystring variable page). In your for loop use for i= start to start+9. Hope this will solve your problem. Cheers!!<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts