资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

分页显示的问题,为什么它老说CINT不匹配

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

<!--#include   file="conn.asp"-->  
   
   
  <%   dim   keyword,stype,errmsg  
  keyword=cstr((request("keyword")))    
  stype=request("stype")  
  if   keyword=""   then  
  errmsg=errmsg+"查找字符不能为空,请重输入查找的信息<a   href=""javascript:history.go(-1)"">返回重查</a>"  
  call   error()  
  Response.End    
  end   if  
  %>  
   
  <div   align="center">  
  <table   width=773   border=0   align=center   cellpadding=0   cellspacing=1   bgcolor="#000000"   valign=middle>    
  <tr>  
  <td   width="100%"   align=center   bgcolor="ffffff">    
  <table   width="100%">  
  <tr>  
                          <td>    
                              <%   dim   rs,sql  
  Set   rs=   Server.CreateObject("ADODB.Recordset")  
  if   stype="Singer"   then  
  sql="select   *   from   Nclass   where   Nclass   Like   %"&   keyword   &"%   order   by   Nclassid   desc"  
  elseif   stype="Music"   then    
   
  sql="select   *   from   Musiclist   where   MusicName   like   %"&keyword&"%"  
  elseif   stype="Special"   then  
  sql="select   *   from   Special   where   Name   Like   %"&   keyword   &"%   order   by   Specialid   desc"  
  else  
  end   if  
  rs.open   sql,conn,1,1  
  dim   currentPage  
  if   not   isempty(request.QueryString("page"))   then  
  currentPage=cint(request.QueryString("page"))  
  else  
  currentPage=1  
  end   if  
  if   rs.eof   and   rs.bof   then  
  if   stype="Singer"   then  
  response.write   "<p   align=center><br><br>Sorry,   未   找   到   你   想   要   的   歌   手<br><br><a   href=""javascript:history.go(-1)"">点   此   返   回</a><br><br></p>"  
  elseif   stype="Music"   then    
  response.write   "<p   align=center><br><br>Sorry,   未   找   到   你   想   要   的   歌   曲<br><br><a   href=""javascript:history.go(-1)"">点   此   返   回</a><br><br></p>"  
  elseif   stype="Special"   then  
  response.write   "<p   align=center><br><br>Sorry,   未   找   到   你   想   要   的   专   辑<br><br><a   href=""javascript:history.go(-1)"">点   此   返   回</a><br><br></p>"  
  elseif   stype="MusicWords"   then  
  response.write   "<p   align=center><br><br>Sorry,   未   找   到   这   歌   词   的   歌   <br><br><a   href=""javascript:history.go(-1)"">点   此   返   回</a><br><br></p>"  
  elseif   stype="SpecialIntro"   then  
  response.write   "<p   align=center><br><br>Sorry,   未   找   到   这   简   介   的   歌<br><br><a   href=""javascript:history.go(-1)"">点   此   返   回</a><br><br></p>"  
   
  end   if  
  else  
  dim   totalPut,MaxPerPage,PageUrl  
  totalPut=rs.recordcount  
  MaxPerPage=2  
  PageUrl="search.asp"  
  if   currentpage<1   then   currentpage=1  
  if   (currentpage-1)*MaxPerPage>totalput   then  
  if   (totalPut   mod   MaxPerPage)=0   then  
  currentpage=   totalPut   \   MaxPerPage  
  else  
  currentpage=   totalPut   \   MaxPerPage   +   1  
  end   if  
  end   if  
  if   currentPage=1   then  
  showpage   totalput,MaxPerPage,PageUrl  
   
  showContent  
  showpage   totalput,MaxPerPage,PageUrl  
  search  
  else  
  if   (currentPage-1)*MaxPerPage<totalPut   then  
  rs.move   (currentPage-1)*MaxPerPage  
  dim   bookmark  
  bookmark=rs.bookmark  
  showpage   totalput,MaxPerPage,PageUrl  
  showContent  
  showpage   totalput,MaxPerPage,PageUrl  
  search  
  else  
  currentPage=1  
  showpage   totalput,MaxPerPage,PageUrl  
  showContent  
  showpage   totalput,MaxPerPage,PageUrl  
  search  
  end   if  
  end   if  
  rs.close  
  end   if  
   
  sub   showContent    
  dim   i  
  i=0    
  %>  
  >  
                              <table   border="0"   width="100%"   cellspacing="0"   cellpadding="0">  
  <td><div   align="center">  
  <!-----------------------搜索歌手----------------------------->  
  <%if   stype="Singer"   then%>  
                                              <table   width="100%"   border="1"   cellpadding="3"   cellspacing="0"   bordercolor="#c0c0c0"   bordercolordark="#FFFFFF"   class="TableLine">  
                                                  <tr>  
  <td   width="50%"   height=22   align=center   bgcolor="#cbe97c">歌手</td>  
  <td   width="25%"   height=22   align=center   bgcolor="#cbe97c">收录歌曲</td>  
  <td   width="25%"   height=22   align=center   bgcolor="#cbe97c">收录专辑</td>  
  </tr>  
  <%  
  Set   Trs=   Server.CreateObject("ADODB.Recordset")  
  do   while   not   rs.eof  
  i=i+1  
  Tsql="SELECT   *   FROM   MusicList   where   Nclassid="+cstr(rs("Nclassid"))  
  Trs.open   Tsql,conn,1,1  
  TotalMNum=Trs.recordcount  
  Trs.close  
  Tsql="SELECT   *   FROM   Special   where   Nclassid="+cstr(rs("Nclassid"))  
  Trs.open   Tsql,conn,1,1  
  TotalSNum=Trs.recordcount  
  Trs.close  
  Tsql="SELECT   *   FROM   Nclass   where   Nclassid="+cstr(rs("Nclassid"))  
  Trs.open   Tsql,conn,1,1  
  Trs.close  
  %>  
  <tr>  
                                                      <td   width="50%">&nbsp;&nbsp;&nbsp;&nbsp;<%=i%>.&nbsp;&nbsp;<a   href="Albumlist.asp?Name=无忧音乐&nbsp;ID=<%=rs("SClassid")%>&nbsp;ArtID=<%=rs("NClassid")%>"><%=rs("Nclass")%><%=rs("En")%></a></td>  
  <td   width="25%"   align=center><%=TotalMNum%> </td>  
  <td   width="25%"   align=center><%=TotalSNum%> </td>  
  </tr>  
  <%  
  if   i>=MaxPerPage   then   exit   do  
  rs.movenext  
  loop  
  set   Trs=nothing  
  %>  
  </table>  
   
  <!-----------------------搜索歌曲----------------------------->  
  <%elseif   stype="Music"   then%>  
                                              <table   border="0"   width="100%"   cellspacing="0"   cellpadding="3"   class="TableLine"   bordercolor="#C0C0C0"   >  
                                                  <tr>  
 

网友回答:


 

 
热门推荐笔记本: TCL笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved