F
fly555
Unregistered / Unconfirmed
GUEST, unregistred user!
首先出来的是个动态条件选择页面,
它的form指向下面这个asp
当第一次显示下面这个asp时,
每页显示三个项目。 是正确的。
最末行也出现了[1 2] ,且 2为粗体, 指向http://localhost/dtcx/default.asp?pageno=2
但是一点击2时,
就提示找不到该页。
什么原因呢?
<!--#include file="conn.asp"-->
<!--获得查询者输入信息-->
<% seek_name=Trim(Request("txt_name"))
seek_xueli=Trim(Request("sel_xueli"))
seek_zhicheng=Trim(Request("sel_zhicheng"))
seek_zhuangkuang=Trim(Request ("sel_zhuangkuang")) %>
<!--如果查询者什么都没有输入-->
<% if((seek_name="") and (seek_xueli="选择") and (seek_zhicheng="选择") and (seek_zhuangkuang="选择")) then
%>
<% Response.Write "您没有输入查询条件!" %>
<% Response.End%>
<% end if %>
<html>
<head>
<title>Untitleddo
cument</title>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68">
<p align="center">&nbsp;</p>
</td>
</tr>
</table>
</td>
<td width="163" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="163" height="68">
<div align="center"><font color="#FF3333">查询结果</font></div>
</td>
</tr>
</table>
</td>
<td width="142" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="142" height="68">
<div align="center"><a href="insert.asp">增加</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<%
sql_text="select * from lyb where "
'<!--查看是否输入了人名-->
if seek_name="" then
'<!--如果没有输入人名-->
sql_text=sql_text
else
'<!--如果输入了人名-->
sql_name="name ='" &
seek_name &
"'"
sql_text = sql_text &
sql_name
end if
'<!--查看是否选择了学历-->
if seek_xueli="选择" then
'<!--如果没有选择学历-->
sql_text=sql_text
else
if (seek_name<>"") then
'<!--在前面输入了要查询的人名-->
sql_xueli= "and xl= '"&
seek_xueli&"'"
else
sql_xueli=" xl ='" &
seek_xueli&"'"
end if
sql_text=sql_text &
sql_xueli
end if
'<!--查看是否选择了职称-->
if seek_zhicheng="选择" then
'<!--如果没有选择职称-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择")) then
'<!--在前面输入了人名或选择了学历-->
sql_zhicheng=" and zc ='" &seek_zhicheng&
"'"
else
sql_zhicheng=" zc ='" &
seek_zhicheng&"'"
end if
sql_text=sql_text &
sql_zhicheng
end if
'<!--查看是否选择了现在状况-->
if seek_zhuangkuang="选择" then
'<!--如果没有选择现在状况-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择") or (seek_zhicheng<>"选择")) then
'<!--在前面输入了人名或选择了学历或选择了职称-->
sql_zhuangkuang=" and zk ='" &seek_zhuangkuang&
"'"
else
sql_zhuangkuang= " zk = '" &
seek_zhuangkuang&
"'"
end if
sql_text=sql_text &
sql_zhuangkuang
end if %>
<% Set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql_text,conn,1,1
%>
<%mpage=rs.pagecount
pageno=request.querystring("pageno")
rs.pagesize=3
rc=rs.pagesize
re=1
do while not rs.eof and rc>0
name=rs("name")
xl=rs("xl")
zc=rs("zc")
zk=rs("zk")
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
rs.absolutepage=pageno
%>
</p>
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="69" valign="top" width="117" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="67">
<div align="center"><font color="#000000">姓名:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top" width="116">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="67">
<div align="center"> <%=name%> </div>
</td>
</tr>
</table>
</td>
<td width="118" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000033" bgcolor="#CC0000">
<tr>
<td width="119" height="67">
<div align="center">学历:</div>
</td>
</tr>
</table>
</td>
<td width="1"></td>
<td width="115" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=xl%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="69" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="69">
<div align="center"><font color="#000000">职称:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="69">
<div align="center"> <%=zc%> </div>
</td>
</tr>
</table>
</td>
<td valign="top" bgcolor="#e1e1e1" colspan="2">
<table width="99%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="118" height="69">
<div align="center">状况:</div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=zk%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="0"></td>
<td></td>
<td bgcolor="#e1e1e1"></td>
<td bgcolor="#e1e1e1"></td>
<td></td>
</tr>
</table>
<table width="468" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="58" valign="top">
<div align="center">
<p>&nbsp;</p>
<p align="left">
<%
rs.movenext
re=re+1
rc=rc-1
loop%>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="694" border="0" cellspacing="0" cellpadding="2" align="center" height="25" bgcolor="F2F2F2">
<tr>
<td width="226"></td>
<td align="center" width="240"> </td>
<td width="330" align="right">[
<% for pno=1 to mpage
if pno=cint(pageno) then
%>
<%=pno%>
</font><%else
%>
<b><a href='default.asp?pageno=<%=pno%>'><%=pno%></a></b>
<%end if%>
<%next%>
]</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
它的form指向下面这个asp
当第一次显示下面这个asp时,
每页显示三个项目。 是正确的。
最末行也出现了[1 2] ,且 2为粗体, 指向http://localhost/dtcx/default.asp?pageno=2
但是一点击2时,
就提示找不到该页。
什么原因呢?
<!--#include file="conn.asp"-->
<!--获得查询者输入信息-->
<% seek_name=Trim(Request("txt_name"))
seek_xueli=Trim(Request("sel_xueli"))
seek_zhicheng=Trim(Request("sel_zhicheng"))
seek_zhuangkuang=Trim(Request ("sel_zhuangkuang")) %>
<!--如果查询者什么都没有输入-->
<% if((seek_name="") and (seek_xueli="选择") and (seek_zhicheng="选择") and (seek_zhuangkuang="选择")) then
%>
<% Response.Write "您没有输入查询条件!" %>
<% Response.End%>
<% end if %>
<html>
<head>
<title>Untitleddo
cument</title>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68">
<p align="center">&nbsp;</p>
</td>
</tr>
</table>
</td>
<td width="163" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="163" height="68">
<div align="center"><font color="#FF3333">查询结果</font></div>
</td>
</tr>
</table>
</td>
<td width="142" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="142" height="68">
<div align="center"><a href="insert.asp">增加</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<%
sql_text="select * from lyb where "
'<!--查看是否输入了人名-->
if seek_name="" then
'<!--如果没有输入人名-->
sql_text=sql_text
else
'<!--如果输入了人名-->
sql_name="name ='" &
seek_name &
"'"
sql_text = sql_text &
sql_name
end if
'<!--查看是否选择了学历-->
if seek_xueli="选择" then
'<!--如果没有选择学历-->
sql_text=sql_text
else
if (seek_name<>"") then
'<!--在前面输入了要查询的人名-->
sql_xueli= "and xl= '"&
seek_xueli&"'"
else
sql_xueli=" xl ='" &
seek_xueli&"'"
end if
sql_text=sql_text &
sql_xueli
end if
'<!--查看是否选择了职称-->
if seek_zhicheng="选择" then
'<!--如果没有选择职称-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择")) then
'<!--在前面输入了人名或选择了学历-->
sql_zhicheng=" and zc ='" &seek_zhicheng&
"'"
else
sql_zhicheng=" zc ='" &
seek_zhicheng&"'"
end if
sql_text=sql_text &
sql_zhicheng
end if
'<!--查看是否选择了现在状况-->
if seek_zhuangkuang="选择" then
'<!--如果没有选择现在状况-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择") or (seek_zhicheng<>"选择")) then
'<!--在前面输入了人名或选择了学历或选择了职称-->
sql_zhuangkuang=" and zk ='" &seek_zhuangkuang&
"'"
else
sql_zhuangkuang= " zk = '" &
seek_zhuangkuang&
"'"
end if
sql_text=sql_text &
sql_zhuangkuang
end if %>
<% Set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql_text,conn,1,1
%>
<%mpage=rs.pagecount
pageno=request.querystring("pageno")
rs.pagesize=3
rc=rs.pagesize
re=1
do while not rs.eof and rc>0
name=rs("name")
xl=rs("xl")
zc=rs("zc")
zk=rs("zk")
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
rs.absolutepage=pageno
%>
</p>
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="69" valign="top" width="117" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="67">
<div align="center"><font color="#000000">姓名:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top" width="116">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="67">
<div align="center"> <%=name%> </div>
</td>
</tr>
</table>
</td>
<td width="118" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000033" bgcolor="#CC0000">
<tr>
<td width="119" height="67">
<div align="center">学历:</div>
</td>
</tr>
</table>
</td>
<td width="1"></td>
<td width="115" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=xl%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="69" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="69">
<div align="center"><font color="#000000">职称:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="69">
<div align="center"> <%=zc%> </div>
</td>
</tr>
</table>
</td>
<td valign="top" bgcolor="#e1e1e1" colspan="2">
<table width="99%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="118" height="69">
<div align="center">状况:</div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=zk%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="0"></td>
<td></td>
<td bgcolor="#e1e1e1"></td>
<td bgcolor="#e1e1e1"></td>
<td></td>
</tr>
</table>
<table width="468" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="58" valign="top">
<div align="center">
<p>&nbsp;</p>
<p align="left">
<%
rs.movenext
re=re+1
rc=rc-1
loop%>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="694" border="0" cellspacing="0" cellpadding="2" align="center" height="25" bgcolor="F2F2F2">
<tr>
<td width="226"></td>
<td align="center" width="240"> </td>
<td width="330" align="right">[
<% for pno=1 to mpage
if pno=cint(pageno) then
%>
<%=pno%>
</font><%else
%>
<b><a href='default.asp?pageno=<%=pno%>'><%=pno%></a></b>
<%end if%>
<%next%>
]</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>