Utan att fördjupa mig i koden, är det inte variabeln intRecordsPerPage som, antagligen högre upp i koden, betämmer hur många poster som ska visas?
Hur ändrar jag denna kod till att endast skriva ut 10 länkar i taget? När man klickar på Next ska man komma till nästa 10.
If intTotalFilesFound > intRecordsPerPage Then
Response.Write("<span class=""text1"">Results: </span>")
If intNumFilesShown > intRecordsPerPage Then
Response.Write("<span class=""text1""><a href=""search.asp?search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & "&results=" & intFileNum - intRecordsPerPage & """>Prev</a> | </span>")
End If
If intTotalFilesFound > intRecordsPerPage Then
For intPageLinkLoopCounter = 1 to CInt((intTotalFilesFound / intRecordsPerPage) + 0.5)
If intFileNum = (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage Then
Response.Write("<span class=""text1"">" & intPageLinkLoopCounter & " | </span>")
Else
Response.Write("<span class=""text1""><a href=""search.asp?search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & "&results=" & (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage & """>" & intPageLinkLoopCounter & "</a> | </span>")
End If
Next
End If
If intTotalFilesFound > intNumFilesShown Then
Response.Write("<span class=""text1""><a href=""search.asp?search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & "&results=" & intNumFilesShown & """>Next</a><br><br></span>")
Else
Response.Write("<span class=""text1""><br><br></span>")
End If
End If

