vanillapod
MIS
Hi I've got a search screen that lets my users set how many results they want displayed, using a drop down they can say All, 10, 25, 50 etc etc.
Anyway the number is passed as cnt2 hre's my code:
<%
Dim limi, cnt
If Request("cnt2")<>"" Then
limi = Request("cnt2")
Else
limi = 11 'default of 10 records
End If
cnt=1
while not (lg.eof) AND cnt < limi
%>
my table row with search results in goes here
<%
cnt=cnt+1
lg.movenext()
wend
%>
but for some reason its not working. When cnt2 is null the page only shows 10 results but if cnt2 contains a value the page just shows everything... can someone show me where I'm going wrong?
Anyway the number is passed as cnt2 hre's my code:
<%
Dim limi, cnt
If Request("cnt2")<>"" Then
limi = Request("cnt2")
Else
limi = 11 'default of 10 records
End If
cnt=1
while not (lg.eof) AND cnt < limi
%>
my table row with search results in goes here
<%
cnt=cnt+1
lg.movenext()
wend
%>
but for some reason its not working. When cnt2 is null the page only shows 10 results but if cnt2 contains a value the page just shows everything... can someone show me where I'm going wrong?