asp代码分页

[复制链接]
查看11 | 回复2 | 2010-5-19 01:40:57 | 显示全部楼层 |阅读模式
请大哥大姐帮忙,下面的代码怎么加“下一页”“上一页”这个东西?谢谢了!!!
Pagecount Then Page = Pagecount
rsPage.AbsolutePage = Page
'sScriptName = Request.ServerVariables("SCRIPT_NAME")
if InstrRev(rsUrl,".asp?") > 0 then
rsUrl = rsUrl & "&Page="
else
rsUrl = rsUrl & "?Page="
end if
strTemp = ""
tmpPage = 10
intPage = Int((Page-1) / tmpPage)
allPage = Int(Pagecount / tmpPage)
If Page1 and intPage0 Then strTemp = strTemp &"[url=]9[/url] "
If intPage>0 Then strTemp = strTemp &"[url=]7[/url] "
If intPage"& n &" "
Else

strTemp = strTemp &" [url=]"& n &"[/url] "
End If
Next
Else
For n=(intPage*tmpPage+1) To Pagecount
If n=Page Then

strTemp = strTemp &" "& n &" "
Else

strTemp = strTemp &" [url=]"& n &"[/url] "
End If
Next
End If
If intPage[url=] [/url] "
If PagePagecount and intPageallPage Then strTemp = strTemp &"[url=]:[/url] "
strTemp = strTemp &"
"& PageCount &"pages"&"
"&rsCount&"pics"
rsToPageHtml = strTemp
End Function
function ifspace(Name)
if Name"" then
ifspace=Name
else
ifspace="-"
end if
end function
%>

回复

使用道具 举报

千问 | 2010-5-19 01:40:57 | 显示全部楼层
Function rsToPageHtml(rsPage,PageSize,rsUrl) If rsPage.EOF Then
rsToPageHtml = "Nothing yet! Please check back later."
Exit FunctionEnd If Dim rsCount,PageCount,Page,sScriptName,strTemp Dim tmpPage, intPage, allPage rsCount = rsPage.RecordCount rsPage.PageSize = PageSize PageCount = rsPage.PageCount
回复

使用道具 举报

千问 | 2010-5-19 01:40:57 | 显示全部楼层
http://hi.baidu.com/wynote/blog/item/8f6752ef3465ae3dadafd527.htmlhttp://hi.baidu.com/wynote/blog/item/1d06e5d9556954ec38012f2e.html
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行