page和ipage(Asp分页问题)

本文目录
Asp分页问题
《%
dim ipage
rs.pagesize=7
rs.open sql
if len(request("ipage"))=0 then
ipage=1
else
ipage=Request("ipage")
end if
rs.absolutepage=ipage
《%
Server.ScriptTimeOut = 1000
dim sql
sql="SELECT iepa00h.pa_no,iepa00h.pa_indat,iepa00h.pa_name,iepb02h.dp_name FROM iepa00h,iepb02h WHERE iepa00h.pa_oudat=’’ And iepa00h.dp_no = iepb02h.dp_no order by dp_name desc"
dim iepa00hRs
set iepa00hrs= Server.CreateObject("ADODB.Recordset")
iepa00hRs.Open sql,cn,3,1
%》
《% = iPage %》ye《/div》《/td》
《td width="169"》《div align="center"》《a href="stake.asp?ipage=1"》
《% If CInt(iPage) = 1 Then %》
《% Else %》
first《/a》《/div》《/td》
《td width="132"》《div align="center"》《a href="stake.asp?ipage=《%=ipage-1%》"》back《/a》
《% End If %》
《/div》《/td》
《td width="171"》《div align="center"》
《% If CInt(iPage) = CInt(rs.PageCount) Then %》
《% Else %》
《a href="stake.asp?ipage=《%=ipage +1%》"》next《/div》《/td》
《tdwidth="96"》《a href="stake.asp?ipage=《%=rs.ipagecount%》"》last《/a》
《% End If %》《/td》
《td width="106"》《% = rs.PageCount %》《/td》
《/tr》
《tr》
《td colspan="2"》 《/td》
《td》 《/td》
《td》 《/td》
《td colspan="2"》 《/td》
《/tr》
《/table》
《p》 《/p》
《p》合计:
《%Response.Write(iepa00hRs.recordcount)%》
人
《%
iepa00hRs.Close()
cn.Close()
%》
不是帮你改了,两个地方错一个是rs.pagesixe=7 改成rs.pagesize=7
还有一个是if len(request("page"))=0 then
ipage=1
else
ipage=Request("page")
end if
改成
if len(request("ipage"))=0 then
ipage=1
else
ipage=Request("ipage")
end if
asp request()的问题,急!!!谢谢您了
1更正一下楼上的,request("page")的意思是都可以接收request.form("page"),request.querystring("page")(post,get)这两个方法传递的变量.
不过这样做会产生漏洞.
例如翻页
楼上的《A HREF="pageV2.asp?page=《%=iPage + 1%》"》是get,但在同时需要一个直接转到n页的,这里一般用form来做,也就是post,所以用一个request("page")就可以接受两种形式的变量.
2
先理清一个概念
page和request("page")里的page没有丝毫关系.
request("page")里的page是request对象一个标量.
vbscript里的变量不需要声明
这也是解释语言和编译语言的一个区别之一
随时用随时申请内存空间.

更多文章:
html网页模板(网页制作设计模板-旅游网页该如何设计模板)
2025年9月29日 04:45
this love歌词taylor(求Taylor Swift的Love Story的歌词的中文翻译~)
2025年6月19日 16:30
span标签有内容却不显示(定义一个CSS,但是只有DIV可以显示出来,span等都无法显示)
2026年7月29日 21:00
void sort是什么意思(请各位说说void sort里的算法是什么意思)
2025年6月20日 00:15
学电脑软件开发哪个学校好(电脑软件开发去什么学校学习比较好)
2026年8月16日 18:45
subject都有什么意思(“subject ”是什么意思)
2026年8月15日 06:00
莫奈的网络解释莫奈的网络解释是什么?莫奈的解释莫奈的解释是什么
2025年7月29日 02:00
网页模板停用不能上报怎么办(请教一下,关于网页模板显示不出来的问题~~)
2025年10月22日 22:45
dateadd函数的语法参数(在VB6.0中,DateAdd函数中,用“w“,“y“与“d“,我怎么感觉都一样呀,都是天)
2026年2月21日 15:30
springfestival用in oron(the Spring Festival前用in还是on)
2026年8月28日 02:45
acquaintance歌曲(新年快乐英文歌除了happy new year还有那些)
2026年4月19日 03:15
constantly continuously(constantly怎么读)
2025年8月8日 18:15











