回 帖 发 新 帖 刷新版面

主题:求助, 在ASP文件启用了多页面时,为什么我这个分页程序就不行了...

求助, 在ASP文件启用了多页面时,为什么我这个分页程序就不行了...
我使用了这个代码后,分页程序就出错,用单个ASP文件正常.
<%
Dim Action
    Action=trim(request("action"))

Select Case Action
    Case "DianNaoData" 
        Call DianNaoData()
    Case "DianNaoUser" 
        Call DianNaoUser()
    End Select
%>
<BODY>
<%
Sub DianNaoData
    On Error Resume Next
%>

我是用这样的分页代码

<%
if not isempty(request("page")) then
    currentPage=cint(request("page"))
else
    currentPage=1
end if
%>
<%
    MaxPerPage=25
    PageUrl=""
    totalPut=rs.recordcount
    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
        showContent
        showpage totalput,MaxPerPage,PageUrl
    else
        if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
            showContent
            showpage totalput,MaxPerPage,PageUrl
        else
            currentPage=1
            showContent
            showpage totalput,MaxPerPage,PageUrl
        end if
    end if
rs.close
sub showContent
end sub
function showpage(totalnumber,MaxSpecialList,filename)
if totalnumber mod MaxSpecialList=0 then
    n= totalnumber \ MaxSpecialList
else
    n= totalnumber \ MaxSpecialList+1
end if
if Classid<>"" then
    linkto="classid="&amp;amp;Classid
else
    linkto=""
end if
%>
<table border="1" align="center" cellpadding="3" cellspacing="0">
<tr>
<td align="center" class=TableRow2>编号</td>
<td align="center" class=TableRow2>客户姓名</td>
<td align="center" class=TableRow2>客户地址</td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>

<tr>
<td align=center class=TableRow2><%=rs("Userid")%></td>
<td align=center class=TableRow2><%=rs("UserName")%></td>
<td align=center class=TableRow2 title='<%=rs("UserAdd")%>'><%=left(rs("UserAdd"),10)%></td>
</tr>
<%
if i>=MaxPerPage then exit do
loop
%>
</table>
这里就是显示上一步下一步的代码,
<% 
end function
%>

出错的信息是:
Microsoft VBScript 编译器错误 错误 '800a03ea' 

语法错误 

/jkwl/Jkwl_DianNaoAllData.asp,行 107 

sub showContent
^

我是新手,实在搞不懂了,翻书网上找答案,没收获, 启用了多页面的文件为什么不能使用这个翻页呢,要这样的代码可以翻页,希望高手帮助.谢谢

回复列表 (共6个回复)

沙发

自己顶上去,

板凳

再顶下, 看看有高手没有

3 楼

38226;p.#&amp;#30367;鎄?Xw鎋?鋚GP私&amp;#26809;&lt;歃!?凹?u?O饲?&gt;&amp;#29216;TXw8&amp;#21284;籽#鮑?Xw篛&amp;#21298;氤.?J8詙G&amp;#20967;?CP?&amp;#22111;e(;8?&amp;#

4 楼

要这样的匹配呀, 这样写法,

5 楼

你这里面的sub showContent什么意思啊?
貌似你是要调用过程阿,调用应该是call showContent

6 楼

[quote]你这里面的sub showContent什么意思啊?
貌似你是要调用过程阿,调用应该是call showContent[/quote]
 我按你的就变成这样的
Microsoft VBScript 编译器错误 错误 '800a03ea' 

语法错误 

/jkwl/Jkwl_DianNaoAllData.asp,行 225 

function showpage(totalnumber,MaxSpecialList,filename)

我来回复

您尚未登录,请登录后再回复。点此登录或注册