asp分页显示代码的问题
[url=http://zhidao.baidu.com/question/kehuNameUpdate.asp?Page=1]我做了个分页显示,但不知道为什么总不显示,
错误显示说是:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0401)
语句未结束
/dianxin/xitongweihu/kehuNameUpdate.asp, line 74, column 26
response.Write "<a href= "kehuNameUpdate.asp?Page=1">第一页</a> "
我的代码是:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>客户名称变更</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<table width="958">
<tr>
<td width="200"><div align="center"><a href="kehuCreate.asp">新建客户</a></div></td>
<td width="200"><div align="center"><a href="yysKehuCreate.asp">新建运营商客户</a></div></td>
<td width="508">
<form id="form1" name="form1" method="post" action="Untitled-1.asp">
<input type="checkbox" name="checkbox" value="checkbox" />
显示整页
<select name="select">
<option>---请选择---</option>
<option>客户名称</option>
<option>客户编号</option>
</select>
<input name="textfield13" type="text" size="15" maxlength="40" />
<input type="submit" name="Submit" value="查询" />
</td>
</tr>
</table>
</form>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.CursorType=3
rs.open"select * from kehu",conn
rs.pagesize=3
Page=CLng(request("Page"))
if Page < 1 then Page = 1
if Page > rs.pagecount then Page = rs.pagecount
rs.absolutepage=Page
for ipage = 1 to rs.pagesize
Recno = (Page - 1)*rs.pagesize+ipage
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="1">
<tr>
<td width="245" height="22" align="center" class="a"><strong>客户编号</strong></td>
<td width="217" height="22" align="center" class="a"><strong>客户名称</strong> </td>
<td width="298" height="22" align="center" class="a"><strong>省份(地区)</strong></td>
<td height="22" align="center" class="a"><strong>操作</strong></td>
</tr>
<tr class="b">
<td><%=rs("id")%></td>
<td width="217" height="18"><%=rs("name")%></td>
<td><%=rs("shengfen")%></td>
<td><a href="kehuNameUpdate1.asp?ID=<%=rs("id")%>&Name=<%=rs("name")%>">修改</td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table>
</td>
</tr>
</table>
<%
if Page<>1 then
response.Write "<a href= "kehuNameUpdate.asp?Page=1">第一页</a> "
response.Write "<a href="kehuNameUpdate.asp?Page="&(Page-1)&"">上一页</a> "
end if
if Page<>rs.pagecount then
response.Write "<a href="kehuNameUpdate.asp?Page="&(Page+1)&"">下一页</a> "
response.Write "<a href="kehuNameUpdate.asp?Page="&rs.pagecount&"">最后一页</a> "
end if
%>
<%
rs.close
conn.close
%>
<hr />
</body>
</html>
参考答案:[/url]从74行开始,改成如下再试下看
response.Write "<a href= ""kehuNameUpdate.asp?Page=1"">第一页</a> "
response.Write "<a href=kehuNameUpdate.asp?Page="&(Page-1)&">上一页</a> "
end if
if Page<>rs.pagecount then
response.Write "<a href=kehuNameUpdate.asp?Page="&(Page+1)&">下一页</a> "
response.Write "<a href=kehuNameUpdate.asp?Page="&rs.pagecount&">最后一页</a> "