为什么分页页码出现负数?
<!-- #include file="conn.asp" --><%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<%
set rs3=conn.execute("select * from fkmx")
rs3.open sql,conn,1,1
rs3.pagesize=10
if request("page")<>"" then
epage=cint(request("page"))
if epage<1 then epage=1
if epage>rs3.pagecount then epage=rs3.pagecount
else
epage=1
end if
rs3.absolutepage=epage
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<table border="0" width="90%" table frame="below" cellpadding="0" style="border-collapse: collapse; border: 1px dotted #A4A4FF" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="19" colspan="4"align="left" type="text" >付款明细</td>
<td height="19" colspan="9"align="right" type="text" ></td>
<tr>
<td width="40" height="28"align="center" type="text" >序号</td>
<td width="7" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="81" align="center" type="text">付款日期</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="80" align="center" type="text">凭证编号</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="78" align="center" type="text">对应科目</td>
<td width="7" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="95" align="center" type="text">付款金额</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="104" align="center" type="text">尚欠金额</td>
<td width="10" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="143" align="center" type="text">发票情况</td>
</tr>
<%
for i=0 to rs3.pagesize
if rs3.bof or rs3.eof then exit for
%>
<tr>
<td height="28"align="center" valign="bottom" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="left" valign="bottom" type="text" ><%=rs3("fkrq")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="center" valign="bottom" type="text"><%=rs3("pzbh")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="left" valign="bottom" type="text"><%=rs3("dykm")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><%=formatnumber(rs3("fkje"),2,-1,0,-1)%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><%=formatnumber(rs3("sqje"),2,-1,0,-1)%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="left" valign="bottom" type="text"><%=rs3("fpqk")%></td>
</tr>
<%
rs3.movenext()
next
%>
<tr>
<td height="25" colspan="13"align="center" valign="bottom" type="text" >
<p align="center">
<a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>">首页</a>
<a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=epage-1%>">前一页</a>
<a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=epage+1%>">后一页</a>
<a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=rs.pagecount%>">末页</a>
</p>
<p align="center">现在是第<%=epage%>页 共<%=rs.pagecount%>页</p>
</td>
</tr>
</table>
</body>
</html>