小女子请高手指点~~〖一个分页问题〗
搜索后可以分页显示第一页,点后面页数搜索为空<%
Class_Name="Search"
Page_Name="Search -- " & Web_Const(0)
Dim SearchSelectkey
IF Action="Userinfo" THEN
Selectkey=Loginuser_Id
SearchSelectkey=Session("Loginuser") & "Publication card"
Else
Selectkey=checkfSQLstr(Request.form("Selectkey"))
SearchSelectkey=Selectkey
End IF
Call Page_Head()
Table_List="Tx_PrClass"
FileName="Prclass"
Set Rs_Manage=server.Createobject("Adodb.Recordset")
IF Request.form("Searchclass")="Products" THEN
Sql="Select * from Tx_Products where Products_Flag=1 And "
IF Request.form("xSearch")="Products_Name" THEN
Sql = Sql & "Products_Name like '%" & Selectkey & "%'"
End IF
IF Request.form("xSearch")="Products_Content" THEN
Sql = Sql & "Products_Content like '%" & Selectkey & "%'"
End IF
Sql = Sql & "order by Products_Date desc"
End IF
Rs_Manage.open Sql,Conn,1,1
%>
<style type="text/css">
<!--
.STYLE1 {font-family: Arial, Helvetica, sans-serif}
.STYLE2 {color: #FFCC33}
.STYLE5 {color: #CC0033}
.STYLE6 {color: #000000}
.STYLE8 {color: #0000FF}
.STYLE9 {font-size: 12px}
.STYLE10 {color: #333333}
.STYLE11 {
font-size: 15px;
font-weight: bold;
color: #CC0000;
}
-->
</style>
<body bgcolor="#ffffff" background="images/back.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<link href="word.css" rel="stylesheet" type="text/css">
<span class="STYLE1">
<!--#include file="Page_Head.asp"-->
</span>
<table width="936" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="13" class="STYLE1"> </td>
<td width="910" valign="top" class="STYLE1"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" align="left" valign="top"><table width="184" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" class="v-11"><table width="184" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><table width="184" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15"> </td>
<td width="161" class="hui-12-01 STYLE11"> <span class="hui-12-01"><IMG src="http://www. alt="1"></span>Product-Center </td>
<td width="8"> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF"><br>
<ll Class_Tree(0,0)%> <%Call Class_Tree(0,0)%></td>
</tr>
</table> </td>
</tr>
<tr>
<td align="left" valign="top"><table width="184" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="7"> </td>
<td width="164" class="hui-12-01"> </td>
<td width="7"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top" height="8"> </tr>
<tr>
<td align="center" valign="top"><!--#include file="PageSearch.asp"--></td>
</tr>
</table></td>
<td width="3%"> </td>
<td width="74%" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#e5e5e5">
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6" colspan="2"> </tr>
<tr>
<td> </td>
<td><span class="STYLE1"><span class="STYLE5">>></span> <span class="STYLE10">Your keyword is</span>:<span class="type-color2"><b><%=SearchSelectkey%></b></span><span style="width:40%;text-align:right;"><span class="STYLE10">There are</span> <span class="type-color2"><b><%=Rs_Manage.recordCount%></b></span> <span class="STYLE10">related records found. </span></span></td>
</tr>
<tr><TD colspan="2"> </TD></tr>
<tr>
<td colspan="2">
<%
Dim xh
Page_Nexterror=4
Rs_Manage.PageSize = SearchMax_Class
totalrec=Rs_Manage.RecordCount
iPageSize=Rs_Manage.PageSize
currentPage=request("page")
IF currentpage="" THEN
currentpage=1
Else
IF Not isChkInteger(currentPage) THEN response.Redirect "javascript:history.go(+1);"
currentpage=clng(currentpage)
End IF
IF totalrec Mod Cint(iPageSize)=0 THEN
n= totalrec \ Cint(iPageSize)
Else
n= totalrec \ Cint(iPageSize)+1
End IF
IF not (Rs_Manage.bof And Rs_Manage.eof) THEN
Rs_Manage.MoveFirst
IF currentpage > n THEN currentpage = n
IF currentpage<1 THEN currentpage=1
Rs_Manage.Move (currentpage-1) * Cint(iPageSize)
xh=0
dim lineheight
While Not Rs_Manage.Eof And page_count<Cint(iPageSize)
page_count=page_count+1
xh=xh+1
IF page_count<>Rs_Manage.RecordCount THEN
lineheight="<DIV CLASS='type-height2'></DIV>"
End IF
%>
<div class="search-content">
<%IF Request.form("Searchclass")="Products" THEN%>
<b><%=xh%>.</b><a href="Products.asp?Id=<%=Rs_Manage("Products_Id")%>" target="_blank"><b><%=replace(Rs_Manage("Products_Name"),Selectkey,"<FONT COLOR=#FF0000>" & Selectkey & "</FONT>")%></b></a>
<div class="search-content1"><%=replace(gotTopic(nohtml(Rs_Manage("Products_Content")),150,1),Selectkey,"<FONT COLOR=#FF0000>" & Selectkey & "</FONT>")%><%=lineheight%></div>
<%End IF%>
</div>
<%
lineheight=""
Rs_Manage.MoveNext
Wend
End IF
Rs_Manage.Close
Set Rs_Manage=Nothing
%></td>
</tr>
<tr>
<td height="32" colspan="2" width="500" align="center">
<%
Call Page_Next()
%></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td align="center" class="v-11 STYLE9"><div align="left"><span class="STYLE10">*If you are unable to search what you want, please contact us for</span> <span class="STYLE8" style="color: #000000"><a href="" class="STYLE8">purchase-for-you</a></span><span style="color: #000000"> <span class="STYLE10">service</span></span></div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="13" class="STYLE1"> </td>
</tr>
<tr>
<td colspan="3" class="STYLE1"> </td>
</tr>
<tr>
<td colspan="3" class="STYLE1"> </td>
</tr>
</table>
<span class="STYLE1">
<!--#include file="Page_Bottom.asp"-->
<%
Call Page_Bottom()
Call CloseConn()
%>
</span>