...

View Full Version : search page problem



m1ke
04-07-2006, 01:22 AM
Hiya. I've got a problem using ASP. Basically, I'm making a online auction site as a project but I'm having some trouble. I've got a search page, which will display all the items. Problem is only 15 will fit on the page, so I want to add some controls to go to the next lot of 15 results and so on.. so it looks sort of like << 1 2 >>

I managed to get this working fine, but now I've added a combo box to specify a category. Initially, there program assumed there were all in the same category so there was no problem but now, since this has been added, I can't do this. Does any one have any ideas how I can fix this? Help would be most appreciated.

I'm not sure what code exactly to post, but here's where I think a problem could lie.. If you need to see more code, please say so. viewitem.asp is the name of the page.

Thanks a lot

<%

if totalrecord>msgperpage then
ctr=1
response.Write("Page < ")
do while(ctr<totalpage+1)
response.Write("<a href=viewitem.asp?countrs="& ctr &">" & ctr & "</a> ")
ctr=ctr+1
loop
response.Write(">")
end if
%>

<%
temp=0
temp=(page-1)*msgperpage

if page>1 then
do until temp=0
rsUser.movenext
temp=temp-1
loop
end if



%>
<% Do while(counter<msgperpage) %>
<%
counter=counter+1
rsUser.movenext
if rsUser.eof then
counter=msgperpage+1
end if
loop
%>

miranda
04-09-2006, 12:36 AM
unless you have the category hard coded into the sql statement you will also need to include that into the query string.

ps is there html in between the delimiters? If not, then get rid of all the excess delimiters. It will speed up your code's execution.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum