社区
ASP
帖子详情
关于Const MaxPerPage=??
ckxp
2003-04-23 12:10:06
这是分页中的问题,目的是自定义每页显视多少条记录:
dim intbook
intbook=12
Const MaxPerPage=intbook
......略.....
为什么程序执行时总提示出错,出错信息:
Const MaxPerPage=intbook _ '//这里错误
请高手帮忙
...全文
60
2
打赏
收藏
关于Const MaxPerPage=??
这是分页中的问题,目的是自定义每页显视多少条记录: dim intbook intbook=12 Const MaxPerPage=intbook ......略..... 为什么程序执行时总提示出错,出错信息: Const MaxPerPage=intbook _ '//这里错误 请高手帮忙
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
china520
2003-04-23
打赏
举报
回复
Const 常量的定义
MaxPerPage=intbook
caoshangfei
2003-04-23
打赏
举报
回复
MaxPerPage=intbook不要const
asp.net汽车销售网站
<!--#include file="conn.asp"--> <!--#include file="config.asp"--> <!--#include file="include/header.asp"--> <title><%=webname%>--新闻快讯</title> <% Dim Intcatid,strOrder,strcat,strcategory Intcatid = 0 Intcatid=SafeRequest("catid",1) strcat = "<a href=chknews.asp><FONT COLOR="&bgclr4&">综合新闻</font></a>" set rs=server.CreateObject("adodb.recordset") If Intcatid <> 0 Then rs.open "select category from category where categoryid="&Intcatid&" ",conn,1,1 strcategory = trim(rs("category")) rs.close strcat = strcat &"-><a href=chknews.asp?catid="&Intcatid&" target=_blank>"& strcategory &"</a> " Else End If %> <TABLE WIDTH="780" BORDER="0" CELLSPACING="0" CELLPADDING="0" class=table-zuoyou align="center" BGCOLOR=<%=bgclr2%> background="<% = webimg16 %>"> <TR><TD HEIGHT="30" bgcolor="<% = bgclr1 %>" width="75" class=table-xia><FONT color="#ffffff"> <b><FONT COLOR=<%=bgclr4%>>您的位置:</b></FONT></TD> <td class=table-xia> <a href="index.asp"><FONT COLOR=<%=bgclr4%>><%=webname%></font></a><font color="#ffffff">-></font><a href="chknews.asp"><FONT COLOR=<%=bgclr4%>><% = strcat %></font></a></td></TR></table> <%
Const
Max
P
erP
age
=20 dim totalPut dim CurrentP
age
dim TotalP
age
s dim j dim sql if Not isempty(SafeRequest("p
age
",1)) then currentP
age
=Cint(SafeRequest("p
age
",1)) else currentP
age
=1 end if If Intcatid = 0 Then rs.open "select newsid,newsname,newscontent,addname,adddate from news Order By adddate desc",conn,1,1 Else rs.open "select newsid,newsname,newscontent,addname,adddate from news Where categoryid = "& Intcatid &" Order By adddate desc ",conn,1,1 End If if rs.eof And rs.bof then Response.Write "<p align='center' class='contents'> 您还没有添加新闻!</p>" else totalPut=rs.recordcount if currentp
age
<1 then currentp
age
=1 end if if (currentp
age
-1)*
Max
P
erP
age
>totalput then if (totalPut mod
Max
Per
asp数字分页函数 实际使用例子。
//调用例子。上面的函数我是封装在p
age
function.asp文件里面的 注明:在引入p
age
function.asp文件之前的也是可以封装成一个固定的文件里面。然后通过引入,调用对应的函数的。
//函数是代码重用的最基础的封装。练习多了,代码敲多了,很多基本的功能,都可以逐步封装成为自己的库代码
<%
Const
Max
P
erP
age
=1
html调用asp边疆,[求助]怎么实现ASP在HTML中调用
下面是文章显示的代码:信息列表dim conndim connstrdim totalPutdim CurrentP
age
dim TotalP
age
sdim i,jdim sqldim rson error resume next'打开数据库set rs=server.createobject("adodb.recordset")'定义每页文章显示数
const
Max
P
erP
age
=10if no...
asp+mysql limit分页
可以套用,测试通过
const
Max
P
erP
age
=10records=200p
age
s=records/
max
p
erp
age
if p
age
scurrentp
age
=cint(request("currentp
age
"))if currentp
age
="" or currentp
age
currentp
age
=1 if currentp
age
>p
age
s then currentpag
怎么用ASP实现分页(二)
dim currentp
age
定义当前页dim filename 文件名
Const
Max
P
erP
age
=20 每页显示的记录个数dim totalnumber 记录总数filename="showp
age
s.asp"totalnumber=200 设置记录总数为200if not isempty(request("p
age
")) thencurrentP
age
=cint(reques
ASP
28,409
社区成员
356,968
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章