易心asp分页类 v1.0(2)
Ex_Id=str
end property
'属性:获得记录总数
public property get getRsCount
getRsCount=Ex_idCount
end property
'属性:获得页总数
public property get getPageCount
if(Ex_idcount>0) then'如果记录总数=0,则不处理
if(Ex_idcount mod Ex_pageSize=0)then'如果记录总数除以每页条数有余数,则=记录总数/每页条数+1
Ex_pageCount=int(Ex_idcount/Ex_pageSize)'获取总页数
else
Ex_pagecount=int(Ex_idcount/Ex_pageSize)+1'获取总页数
end if
getPageCount=Ex_pagecount
else
getPageCount=0
end if
end property
'属性:获得当前页数
public property get getPage
getPage=Ex_Page
end property
'获得本页要用到的id
private sub ids
dim i
Ex_sql="select "&Ex_Id&" "& Ex_datafrom &" " &" "&Ex_strWhere&" "&Ex_order
Ex_rs.open Ex_sql,Ex_conn,1,1
if not Ex_Rs.eof and not Ex_Rs.bof then
Ex_rs.pagesize =Ex_pageSize '每页显示记录数
Ex_Rs.absolutepage=CInt(Ex_Page)
Ex_idcount=Ex_rs.recordcount
if Ex_page < 1 then Ex_page = 1
if Ex_page > Ex_pagecount then Ex_page = Ex_pageCount
if Ex_pageCount > 0 then Ex_rs.absolutepage =Ex_page
for i=1 to Ex_rs.pagesize
内容版权声明:除非注明,否则皆为本站原创文章。