[ <% dim newurl
dim requestedQueryStr
requestedQueryStr=request.ServerVariables("QUERY_STRING")
if instr(requestedQueryStr,"&Page=") then '如果已经有?Page 重新置为?Page
requestedQueryStr="?"&left(requestedQueryStr,instr(requestedQueryStr,"&Page")-1) & "&Page=" '
elseif instr(requestedQueryStr,"Page") then '如果已经有&Page
requestedQueryStr="?Page="
elseif requestedQueryStr="" then
requestedQueryStr="?Page="
elseif requestedQueryStr<>"" then
requestedQueryStr="?"&requestedQueryStr&"&Page="
end if
newurl="http://" & request.ServerVariables("HTTP_HOST")&Request.ServerVariables("URL")&requestedQueryStr
newurl=server.HTMLEncode(newurl)
for i=1 to Page_Count
if i=cint(CPage) then
response.Write "<a href=""" & newurl & cstr(i)&"""><font color=""#FF0000"">" & cstr(i) &"</font></a>" & " "
else
response.Write "<a href=""" & newurl & cstr(i)&""">" & cstr(i) &"</a>" & " "
end if
next
%>]
另存为一个asp文件,包含到你需要分页的就可以了