类似这样的程序如何转换为能在asp页面运行的程序

[复制链接]
查看11 | 回复1 | 2009-4-29 09:03:27 | 显示全部楼层 |阅读模式
清高收帮我转一下 以前是函数调用的 我想直接在asp中用
sub ShowProduct(TitleLen)
if TitleLen200 then
TitleLen=50
end if

if currentpagetotalput 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,productUrl,UpdateTime,Hits from Product where Passed=True "

if BigClassName"" then
sqlProduct=sqlProduct & " and BigClassName='" & BigClassName & "' "
if SmallClassName"" then
sqlProduct=sqlProduct & " and SmallClassName='" & SmallClassName & "' "
end if
end if
sqlProduct=sqlProduct & " order by UpdateTime desc"
Set rsProduct= Server.CreateObject("ADODB.Recordset")
rsProduct.open sqlProduct,conn,1,1
if rsProduct.bof andrsProduct.eof then
response.Write("
[color=]没有任何产品
")
else
if currentPage=1 then
call ProductContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then

rsProduct.move(currentPage-1)*MaxPerPage

dim bookmark

bookmark=rsProduct.bookmark

call ProductContent(TitleLen)

else

currentPage=1

call ProductContent(TitleLen)

end if
end if
end if
rsProduct.close
set rsProduct=nothing
end sub

回复

使用道具 举报

千问 | 2009-4-29 09:03:27 | 显示全部楼层
这不就是Asp程序吗?...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行