请教 高手帮改一段ASP代码,谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/28 01:46:59
sub ShowProduct(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
sqlProduct="select top " & MaxPerPage
else
sqlProduct="select "
end if

sqlProduct=sqlProduct & " ID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "

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

dim i,strTemp
i=0
strTemp=""
strTemp= strTemp & "<table width=95% align=center border=0 cellspacing=10 cellpadding=0>"
'输出表定义
do while not rsProduct.eof
if i mod 2 = 0 then //这是第一列,加行定义符
strTemp= strTemp & "<tr>"
endif
strTemp= strTemp & "<td width=60% rowspan=6>"
strTemp= strTemp & "<div align=center><a href=ProductShow.asp?ID=" & rsProduct("ID") & " target=_blank>"
strTemp = strTemp & "</td>"

i = i+1
next

难道LZ连起码的ASP语法都不懂?

if i mod 2 = 0 then //这是第一列,加行定义符

这么简单的错误你不会自己改呀

detax 最好别理LZ