The common pagination you write yourself to set the number of paging links that are displayed, with the Drop-down selection:
1<% 2 ' written by Shaoyun 20:17 May 29, 2008 0:38 3 ' Email:shaoyun at yeah.net 4 ' blog:http://shaoyun.cnblogs.com 5 ' paging function: SP Litpage (total number of records, number of records per page, display several paging links) 6Function Splitpage (rscount,pagesize,shownum) 7 8Dim pagenum,curpage,first_page,last _page,up_page,down_page,idx,addr_url,splitpage_html 9 10addr_url=request.servervariables ("url") 11addr_url=Mid ( Addr_url,instrrev (Addr_url, "/") +1 12addr_url=addr_url & "? page=" 14if (rscount mod pagesize) =0 Then Count/pagesize 16else pagenum=rscount/pagesize+1 18end if 19first_page=1 20last_page=pagenum 22curpage=1 23if isnum Eric (Request. QueryString ("page")) then Curpage=trim (request.
QueryString ("page")) ' if Pagenum-curpage<0 then curpage=pagenum 26else curpage=1 28end if ' 30up_page=curpage-1 31down_page=curpage+1 33splitpage_html= "Total $rscount$ records $pagesize $/page $curpage$/$pagenum $ page
" 34splitpage_html=replace (splitpage_html, "$rscount $", Rscount) 35splitpage_html=replace (splitpaGe_html, "$pagesize $", pagesize) 36splitpage_html=replace (splitpage_html, "$curpage $", curpage) 37splitpage_html= Replace (splitpage_html, "$pagenum $", pagenum) 39splitpage_html=splitpage_html & "<a href= '" & Addr_url
& First_page & "' > Home </a> " 40if curpage>1 then splitpage_html=splitpage_html & "<a href=" "& Addr_url & Up_page &" ' > Prev
</a> "
42else splitpage_html=splitpage_html & "Prev " 44end if 46dim fbegin,fend 47if shownum mod 2 then Show_front_num=int (SHOWNUM/2) show_back_num=int (SHOWNUM/2) 5
0else Wuyi Show_front_num=int (SHOWNUM/2)-1 show_back_num=int (SHOWNUM/2) 53end if 54if Curpage-1<show_front_num then Fbegin=1 fend=shownum 57elseif Curpage+show_back_num>pagenum then Fend=pagenum 1 60else fbegin=curpage-show_front_num fend=curpage+show_back_num 63end if 64for idx=fbegin to fend-if curpage -idx=0 then Splitpage_hTml=splitpage_html & "<b>" & idx & "</b> " Splitpage_html=splitpage_html & "<a href= '" & Addr_url & idx & "' > ' & idx &"
</a> " End If 70next 72if pagenum-curpage>0 then splitpage_html=splitpage_html & "<a href= '" & Addr_url
& Down_page & "' > Next page </a> "
74else splitpage_html=splitpage_html & "Next page " 76end if 77splitpage_html=splitpage_html & "<a href=" "& Addr_url & Last_page &" ' > Last </a>&
; nbsp; "
79splitpage_html=splitpage_html & "Jump to " 80splitpage_html=splitpage_html & "<select Onchange=window.location.href=this.options[this.selectedindex]. Value> "81For idx=1 to Pagenum" If curpage-idx=0 Then-splitpage_html=splitpage_html & "<option value= '" & Addr_url & idx & "' selected>" & idx & "Page </option>"-Else SPLITPAGE_HTML=SPLITPAge_html & "<option value=" "& Addr_url & idx &" ' > First "& idx &" Page </option> " 87Next 88splitpage_html=splitpage_html & "</select>" 90response. Write splitpage_html 92End Function 93%>