大虾门 帮俺看一下这代码啊 不知道怎么搞 万分感谢啊
我是ASP白痴 什么都不懂的,求大虾门教我一下下面的东西怎么弄哦下面这段代码是首页调用我们的网站产品目录列表的代码 请问我怎么才弄让这个列表只显示10个条目而不是显示全部目录列表呢
首页调用的代码是 <% call ShowSmallClass_Tree() %>
调用过来的过程是另外一个页上的代码
'过程名:ShowSmallClass_Tree
'作 用:树形目录方式显示栏目
'参 数:无
'=================================================
sub ShowSmallClass_Tree()
if rsBigClass.bof and rsBigClass.eof then
response.Write "栏目正在建设中……"
else
dim sqlClass,rsClass,strTree,BigClassNum,i,j
rsBigClass.movefirst
BigClassNum=rsBigClass.recordcount
i=1
do while not rsBigClass.eof
if i<BigClassNum then
strTree=""
else
strTree=""
end if
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
strTree= strTree & "<table width=180 border=0 cellpadding=0 cellspacing=0>"
strTree= strTree & "<tr>"
strTree= strTree & "<td width=24 height=22>"
strTree= strTree & "<div align=center><img src=Img/arrow_2.gif width=13 height=11></div></td>"
strTree= strTree & "<td width=150>"
strTree= strTree & "<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "'>"
strTree=strTree & rsBigClass("BigClassName")
strTree=strTree & "</a></td>"
'strTree=strTree & "</td>"
strTree= strTree & "</tr><tr>"
strTree=strTree & "<TD height=1 colspan=2 background=img/naSzarym.gif>"
strTree=strTree & "<IMG height=1 src=img/1x1_pix.gif width=10></TD>"
strTree=strTree & "</TR>"
strTree=strTree & "</table>"
SmallClassNum=rsClass.recordcount
j=1
do while not rsClass.eof
rsClass.movenext
j=j+1
loop
response.write strTree
rsBigClass.movenext
i=i+1
loop
rsClass.close
set rsClass=nothing
end if
end sub