下载安卓APP箭头
箭头给我发消息

客服QQ:3315713922

ASP程序实现快速保存参数值的分页功能

作者:课课家     来源: http://www.kokojia.com/点击数:433发布时间: 2015-11-07 11:45:19

标签: 编程语言编程视频编程开发

大神带你学编程,欢迎选课
今天由小编为大家讲解有关语言编程的文章,相信对大家一定有很大的帮助
c语言编程入门以下为引用的内容:
<%''+++++++++++++++++++++++++++++++++++++++++++++++++++++++
''调用例子
'Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
'int_RPP=2 '设置每页显示数目
'int_showNumberLink_=8 '数字导航显示数目
'showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
'str_nonLinkColor_="#999999" '非热链接颜色
'toF_="9"     '首页
'toP10_=" 7"   '上十
'toP1_=" 3"   '上一
'toN1_=" 4"   '下一
'toN10_=" 8"   '下十
'toL_=":"    '尾页
'============================================
'这段代码一定要在VClass_Rs.Open 与 for循环之间
' Set VClass_Rs = CreateObject(G_FS_RS)
' VClass_Rs.Open This_Fun_Sql,User_Conn,1,1
' IF not VClass_Rs.eof THEN
' VClass_Rs.PageSize=int_RPP
' cPageNo=Hack(Request.QueryString("Page"))
' If cPageNo="" Then cPageNo = 1
' If not isnumeric(cPageNo) Then cPageNo = 1
' cPageNo = Clng(cPageNo)
' If cPageNo<=0 Then cPageNo=1
' If cPageNo>VClass_Rs.PageCount Then cPageNo=VClass_Rs.PageCount
' VClass_Rs.AbsolutePage=cPageNo
'   FOR int_Start=1 TO int_RPP
   ''++++++++++
   '加循环体显示数据
   ''++++++++++
'  VClass_Rs.MoveNext
'  if VClass_Rs.eof or VClass_Rs.bof then exit for
'      NEXT
' END IF  
'============================================
'response.Write "

"&  fPageCount(VClass_Rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
''++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'*********************************************************
' 目的:分页的页面参数保持
'          提交查询的一致性
' 输入:moveParam:分页参数
'         removeList:要移除的参数
' 返回:分页Url
'*********************************************************
Function PageUrl(moveParam,removeList)
 dim strName
 dim KeepUrl,KeepForm,KeepMove
 removeList=removeList&","&moveParam
 KeepForm=""
 For Each strName in Request.Form
  '判断form参数中的submit、空值
  if not InstrRev(","&removeList&",",","&strName&",", -1, 1)>0 and Request.Form(strName)<>"" then
   KeepForm=KeepForm&"&"&strName&"="&Server.URLencode(Request.Form(strName))
  end if
  removeList=removeList&","&strName
 Next
 
 KeepUrl=""
 For Each strName In Request.QueryString
  If not (InstrRev(","&removeList&",",","&strName&",", -1, 1)>0) Then
   KeepUrl = KeepUrl & "&" & strName & "=" & Server.URLencode(Request.QueryString(strName))
  End If
 Next
 
 KeepMove=KeepForm&KeepUrl
 
C语言视频教程 If (KeepMove <> "") Then
   KeepMove = Right(KeepMove, Len(KeepMove) - 1)
   KeepMove = Server.HTMLEncode(KeepMove) & "&"
 End If
 

文件管理器程序可以进行几乎所有的文件管理操作。它不仅具备一般的上传、下载、新建、重命名文件等功能,还提供了诸多实用的其它功能,根据这些实用功能,我们可以完成对网站的管理维护等相关操作。

软件提供了独有的远程文件下载功能,目的是将其它服务器里的文件直接下载到网站服务器中,它的好处是由于两者都是高速Web服务器,文件传输的速度比直接从本地上传要快很多,可以方便的进行网站程序安装等操作


 'PageUrl = replace(Request.ServerVables("URL"),"/Search."/Search.html") & "?" & KeepMove & moveParam & "="
 PageUrl =  "?" & KeepMove & moveParam & "="
End Function

Function fPageCount(Page_Rs,showNumberLink_,nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,Page)
Dim This_Func_Get_Html_,toPage_,p_,sp2_,I,tpagecount
Dim NaviLength,StartPage,EndPage
This_Func_Get_Html_ = ""  : I = 1  
NaviLength=showNumberLink_
if IsEmpty(showMorePageGo_Type_) then showMorePageGo_Type_ = 1
tpagecount=Page_Rs.pagecount
If tPageCount if not Page_Rs.eof or not Page_Rs.bof then
toPage_ = PageUrl("Page","submit,GetType,no-cache,_")
if Page=1 then
 This_Func_Get_Html_=This_Func_Get_Html_& ""&toF_&" " &NewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& " &vbNewLine
End If
if Page StartPage = 1
else
 StartPage = fix(Page / NaviLength) * NaviLength
end if
EndPage=StartPage+NaviLength-1
If EndPage>tPageCount Then EndPage=tPageCount
If StartPage>1 Then
 This_Func_Get_Html_=This_Func_Get_Html_& "  &vbNewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& ""&toP10_&" "  &vbNewLine
End If
If Page <> 1 and Page <>0 Then
 This_Func_Get_Html_=This_Func_Get_Html_& "  &vbNewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& ""&toP1_&" "  &vbNewLine
End If
For I=StartPage To EndPage
 If I=Page Then
  This_Func_Get_Html_=This_Func_Get_Html_& ""&I&""  &vbNewLine
 Else
  This_Func_Get_Html_=This_Func_Get_Html_& ""  &vbNewLine
 End If
 If I<>tPageCount Then This_Func_Get_Html_=This_Func_Get_Html_& vbNewLine
Next
If Page <> Page_Rs.PageCount and Page <>0 Then
 This_Func_Get_Html_=This_Func_Get_Html_& " "  &vbNewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& ""&toN1_&" "  &vbNewLine
End If
If EndPage This_Func_Get_Html_=This_Func_Get_Html_& " "  &vbNewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& " "&toN10_&" "  &vbNewLine
End If
if Page_Rs.PageCount<>Page then 
 This_Func_Get_Html_=This_Func_Get_Html_& "  &vbNewLine
Else
c语言程序设计 This_Func_Get_Html_=This_Func_Get_Html_& ""&toL_&""  &vbNewLine
End If
If showMorePageGo_Type_ = 1 then
 Dim Show_Page_i
 Show_Page_i = Page + 1
 if Show_Page_i > tPageCount then Show_Page_i = 1
 This_Func_Get_Html_=This_Func_Get_Html_& "" &vbNewLine _
  &"Javascript:var Js_JumpValue;Js_JumpValue=document.all.Func_Input_Page.value;if(Js_JumpValue=='' !isNaN(Js_JumpValue)) location='"&topage_&"'+Js_JumpValue; else location='"&topage_&"1';"">"  &vbNewLine
Else
 This_Func_Get_Html_=This_Func_Get_Html_& " 跳转:



" &vbNewLine
End if
This_Func_Get_Html_=This_Func_Get_Html_& p_&sp2_&"  每页"&Page_Rs.PageSize&"个记录,现在是:"&sp2_&Page&"/"&tPageCount&"页,共"&sp2_&Page_Rs.recordCount&"个记录。"
else
 '没有记录
end if
fPageCount = This_Func_Get_Html_
End Function
%>

文章很精彩,是否还想了解更多关于视频教程的文章,课课家官网是一个知识的海洋
赞(114)
踩(3)
分享到:
华为认证网络工程师 HCIE直播课视频教程