求一个asp分页代码.要求在写文章的时候在正文输入〔fenye]等字样它就在哪分!

来源:百度知道 编辑:UC知道 时间:2024/07/02 15:04:27
求一个asp分页代码.要求在写文章的时候在正文输入〔fenye]等字样它就在哪分!

寻求这样的代码!

从自己的类中抽取了实现内容页分页的部份代码出现,希望能你有帮助。
内容中的{SEPARATOR}为分页符。

<%
Dim ID : ID = Request.QueryString("ID")
Dim content
content = "从数据库取得了文章数据"

If instr(content,"{SEPARATOR}")>0 Then
'有分页符的情况:作分页处理
tmpStr = split(content,"{SEPARATOR}")
tmpArr(5) = Cint(UBound(tmpStr))
ContPageCount = Cint(UBound(tmpStr))
Dim CP : CP = Request.QueryString("CP")
if Not(isNumeric(CP)) or CP="" then CP = 0
if Cint(CP) > Cint(UBound(tmpStr)) then CP = UBound(tmpStr)
content = tmpStr(CP)
Response.Write(content&VBNewLine&"<div class='ShowPage'>"&ShowItemPage("Item.asp?ID="&ID)&"</div>")
Else
'无分页符的情况:直接输出内容
Response.Write(content)
End If

'====================================================
'//显示内容页分页链接函数
'//参数:urlPar-点分页链接进入的页面及URL参数