创建一个ASP通用分页类

2019-04-02 22:47:28王冬梅

int_TotalPage = CLng(int_TotalRecord / XD_PageSize * -1)*-1
  Else
int_TotalPage = CLng(int_TotalRecord / XD_PageSize * -1)*-1+1
  End If
End If

If Int_curpage>int_Totalpage Then
  int_curpage=int_TotalPage
End If

'=====================================================
'显示分页信息,各个模块根据自己要求更改显求位置
'=====================================================
response.write "
str_tmp=ShowFirstPrv '显示首页、前一页
response.write str_tmp  
str_tmp=showNumBtn '数字导航
response.write str_tmp
str_tmp=ShowNextLast  '下一页、末页
response.write str_tmp
str_tmp=ShowPageInfo
response.write str_tmp
response.write ""
end Sub

到这里类的功能才算完整(为了节省版面,我有些方法没有放上去,再下面附上全部完整代码)写一个简单页面测试一下