asp分页的一个类(4)
end if
response.write ""
response.write "</td>"
response.write "</tr>"
response.write "</table>"
end function
public function GetPageNo()
GetPageNo = cint(MyPage_PageAbsolute)
end function
public function GetPageCount()
GetPageCount = cint(MyPage_PageTotal)
end function
public function GetPageNoName()
GetPageNoName = "MyPage_PageNo"
end function
public function GetPageSize()
GetPageSize = MyPage_PageSize
end function
public function GetRecordTotal()
GetRecordTotal = MyPage_RecordTotal
end function
private function FormatMyPage_TotalStrSql(strSql)
FormatMyPage_TotalStrSql = "select count(*) as total "
FormatMyPage_TotalStrSql = FormatMyPage_TotalStrSql & Mid(strSql,instr(strSql,"from"))
FormatMyPage_TotalStrSql = Mid(FormatMyPage_TotalStrSql,1,instr(FormatMyPage_TotalStrSql&"order by","order by")-1)
end function
private function FormatMyPage_StrSql(strSql)
FormatMyPage_StrSql = replace(strSql,"select","select top "&(MyPage_PageAbsolute*Cint(MyPage_PageSize)))
end function
private function MyPage_PageAbsoluteRequest()
if request("MyPage_PageNo")="" then
MyPage_PageAbsoluteRequest = 1
else
if IsNumeric(request("MyPage_PageNo")) then
MyPage_PageAbsoluteRequest = request("MyPage_PageNo")
内容版权声明:除非注明,否则皆为本站原创文章。