asp+sql2000存儲過程分頁實例(2)_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:ASP點擊刷新驗證碼實例代碼
      現在網站上大部分的驗證碼都是圖片驗證碼,就跟 http://dwww.cn/Books.asp 下邊的一樣。 用戶可能長時間的停留在頁面上,等到最后提交的時候,驗證碼就可能過期了。所以要加個刷新的功能。 驗證碼:input name='checkimg' type='text' class='input' id='che


      end
      end
      else
      begin
      set @strSql = 'select top'+str(@pageSize)+' '+@strGetFields+' from '+@tablename+' where '+@strOrder+' '+@strTemp+' ('+@strOrder+')'
      +' from (select top '+str((@pageIndex-1)*@pageSize)+' '+@strGetFields+' from '+@tablename+ ' '+@strOrders+ ') as tempTable ) '+@strOrders

      if @strWhere != ' '
      begin
      set @strSql = 'select top '+str(@pageSize)+ ' '+@strGetFields+' from '+@tablename+ ' where '+@strOrder+ ' '+@strTemp+' ('+@strOrder+') '
      +' from(select top '+str((@pageIndex-1)*@pageSize)+' '+@strGetFields+' from '+@tablename+' where '+@strWhere+' ' +@strOrders+') as tempTable) and '+@strWhere+' '+@strOrders

      end
      end
      exec(@strSql)
      end
      GO
      3.asp調用頁面:list.asp
      <!--#include file="conn.asp"-->
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
      <script language="javascript">
      function checkpage()
      {
      if(isNaN(document.fenye.page.value))
      {
      alert("跳轉頁碼請輸入數字!");
      document.fenye.page.focus();
      document.fenye.page.value='';
      return false;
      }
      if(document.fenye.page.value=='')
      {
      alert("跳轉頁碼不能為空!");
      document.fenye.page.focus();
      document.fenye.page.value='';
      return false;
      }
      }
      </script>
      <title>dwww.cn 存儲分頁</title>
      <%
      dim TableName,Page,TotalRs,PageNum,TotalPage,SearchChar,strGetFields,strOrder
      '存儲過程參數
      TableName="cTongJi_product"
      strGetFields=" id,ip,into_time "'字段開始結束加上空格
      strOrder="id"
      PageNum=30
      '搜索關鍵字
      key=request("key")
      '按什么字段搜索
      kind=request("kind")
      '分頁參數
      page=cint(request("page"))
      trs=request("trs")
      tpa=request("tpa")

      分享:ASP實現js圖片的輪顯
      下午做了一個asp+js實現 圖片的輪顯的效果,效果圖 如: 左側的圖片輪顯,在 我用的是js,然后我改了一下用asp實現效果 的。 pic.asp源代碼: % '連接數據庫代碼省去了 sql=(select * from Pic order by picorder asc,id desc) Set rs=server.CreateObject(

      來源:模板無憂//所屬分類:ASP教程/更新時間:2012-06-08
      相關ASP教程