谁能帮修改下这段ASP代码 谢过了

来源:百度知道 编辑:UC知道 时间:2024/06/03 06:12:21
本来产品图片是竖向排列的 像改成横向排列 一排四个 每页9排 改修改哪里

底下是部分代码

sub ShowArticle(TitleLen)
if TitleLen<0 or TitleLen>200 then
TitleLen=50
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
sqlArticle="select top " & MaxPerPage
else
sqlArticle="select "
end if
sqlArticle=sqlArticle & " ArticleID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "

if BigClassName<>"" then
sqlArticle=sqlArticle & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>&

楼主的代码是不是没发全啊?
要是发全了,这段代码的功能是分页而不是控制输出格式的。
-------------------------------------------------------------------
下面是同时显示图片和文字的,只要改变MaxPerPage的值就能控制每页显示的数量,用下面的代码替换原来的ArticleContent(intTitleLen)过程(就是最后那段sub),样式楼主自己做吧
sub ArticleContent(intTitleLen)
dim i,strTemp,perCol
perCol=4'每行显示的数量
i=0
'strTemp = strTemp & ""
response.Write("<table width=100% border=0 cellspacing=3 cellpadding=0>")
response.Write("<tr>")
do while not rsArticle.eof
strTemp=""
strTemp= strTemp & "<td width=25%>"
strTemp= strTemp & "<p align=center><a href=ArticleShow.asp?ArticleID=" & rsArticle("articleid") & ">"
strTemp= strTemp & "<img border=0 src=" & rsArticle("DefaultPicUrl") & " width=200 height=200>"
strTemp= strTemp & "</a></p>"
strTemp= strTe