相册问题,今天可以看了,谢谢各位高手了。

zr130 2005-09-24 08:24:49
http://www.changjiangriver.net/index_photo_list.asp是个相册
选择第二页时为什么大图却显示在第一页了,要是再看第二页的小图时还要再选择一次,
请问这是什么原因
...全文
156 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
jingxiaoping 2005-09-26
  • 打赏
  • 举报
回复
msn:jingxiaoping@hotmail.com
zr130 2005-09-26
  • 打赏
  • 举报
回复
太棒了,太谢谢你了,可是我今天凌晨在家也这么写来的,怎么就不行呢,奇怪了,
总之太谢谢你了: jingxiaoping(南无本师释迦牟尼佛) 。
这个问题困扰我快一个星期了。你的别的联系方式吗, 以后要是有问题还可以问你呀,
对了,我忘了谢谢前面两位qfacy(两袖清风) ybfqlyq(ybfqlyq),也谢谢你们了,呵呆
zr130 2005-09-24
  • 打赏
  • 举报
回复
我把刚才那句改成: <a href="index_photo_list.asp?id=<%=rs("id")%>&pageno=request("pageno")"> <img src="<%=trim(rs("picture"))%>" width="60" height="80" border="0" /></a>
结果出现下面的错误了:
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: "request("]'

/index_photo_show.asp,行 10

第10行就是:if PageNo="" or PageNo=0 then PageNo=1 是不是还是这个有问题啊
zr130 2005-09-24
  • 打赏
  • 举报
回复
在网上有啊,http://www.changjiangriver.net/index_photo_list.asp就这个,你是说光下面那个图片列表吗
也有是http://www.changjiangriver.net/index_photo_show.asp
qfacy 2005-09-24
  • 打赏
  • 举报
回复
不可能不好用!你把它船到网上,我看看!
zr130 2005-09-24
  • 打赏
  • 举报
回复
啊,不行了,这可怎么办啊,要不我单写一个分页程序放到那个页面里算了,
或者刚才你们说的,加一个PAGENO=PAGENO可是这好像没用啊
qfacy 2005-09-24
  • 打赏
  • 举报
回复
<a href="index_photo_list.asp?id=<%=rs("id")%>"&pageno=request("pageno")> <img src="<%=trim(rs("picture"))%>" width="60" height="80" border="0" /></a>
这个是对的
你试试看!
zr130 2005-09-24
  • 打赏
  • 举报
回复
对了,那个图片链接是:
<a href="index_photo_list.asp?id=<%=rs("id")%>"> <img src="<%=trim(rs("picture"))%>" width="60" height="80" border="0" /></a>
如果加上刚才高手的那句话是这样吗:
<a href="index_photo_list.asp?id=<%=rs("id")%>"&pageno=request("pageno")> <img src="<%=trim(rs("picture"))%>" width="60" height="80" border="0" /></a>
zr130 2005-09-24
  • 打赏
  • 举报
回复
对了,再问一下高手们,请问我如何才能把ASP提高上去呢,有人说我思维混乱,怎样才能把思路理清呢,
zr130 2005-09-24
  • 打赏
  • 举报
回复
好的,我试试,(其实这个办法我昨天想到了,就是不会写这个语句,不好意思,因为手边也没有书)
是不是在第二页传时那PAGENO的值是空或是0所以才显示是第一页啊
qfacy 2005-09-24
  • 打赏
  • 举报
回复
你把你的图片连接价格参数
index_photo_list.asp?id=4&pageno=request("pageno")
zr130 2005-09-24
  • 打赏
  • 举报
回复
对了,这个分页的函数是放在CONN。ASP里的,我包含在PHOTO_SHOW里面了
zr130 2005-09-24
  • 打赏
  • 举报
回复
还没有填完,刚才说不让边续发三条的,现在发,谢谢各位高手了
然后下面调用的是 翻页程序:<%call showpage(url,rs.RECORDCOUNT,maxperpage,false,true,"张照片")%>

那个翻页程序是:
function JoinChar(strUrl)
if strUrl="" then
JoinChar=""
exit function
end if
if InStr(strUrl,"?")<len(strUrl) then
if InStr(strUrl,"?")>1 then
if InStr(strUrl,"&")<len(strUrl) then
JoinChar=strUrl & "&"
else
JoinChar=strUrl
end if
else
JoinChar=strUrl & "?"
end if
else
JoinChar=strUrl
end if
end function
sub showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
if totalnumber>0 then
dim n, i,strTemp,strUrl
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp=strTemp & "共 <font color=blue><b>" & totalnumber & "</b></font> " & strUnit & "   "
strUrl=JoinChar(sfilename)
if PageNo<2 then
strTemp=strTemp & "首页 上一页 "
else
strTemp=strTemp & "<a href='" & strUrl & "PageNo=1'>首页</a> "
strTemp=strTemp & "<a href='" & strUrl & "PageNo=" & (PageNo-1) & "'>上一页</a> "
end if

if n-PageNo<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & strUrl & "PageNo=" & (PageNo+1) & "'>下一页</a> "
strTemp=strTemp & "<a href='" & strUrl & "PageNo=" & n & "'>尾页</a>"
end if
strTemp=strTemp & " 页次:<strong><font color=red>" & PageNo & "</font>/" & n & "</strong>页 "
strTemp=strTemp & " <b>" & maxperpage & "</b>" & strUnit & "/页"
if ShowAllPages=True then
strTemp=strTemp & " 转到:<select name='page' size='1' onchange=""javascript:window.location='" & strUrl & "PageNo=" & "'+this.options[this.selectedIndex].value;"">"
for i = 1 to n
strTemp=strTemp & "<option value='" & i & "'"
if cint(PageNo)=cint(i) then strTemp=strTemp & " selected "
strTemp=strTemp & ">第" & i & "页</option>"
next
strTemp=strTemp & "</select>"
end if
response.write strTemp
end if
end sub
qfacy 2005-09-24
  • 打赏
  • 举报
回复
你后边加个参数pageno=pageno
ybfqlyq 2005-09-24
  • 打赏
  • 举报
回复
不是這裡。是分頁那裡。
zr130 2005-09-24
  • 打赏
  • 举报
回复
下面的代码是在index_photo_show.asp里面的,就是下面那一部分的图片列表,
if not rs.eof then
dim maxperpage,url,PageNo
url="index_photo_list.asp"
rs.pagesize=10
PageNo=REQUEST("PageNo")
if PageNo="" or PageNo=0 then PageNo=1
RS.AbsolutePage=PageNo
TSum=rs.pagecount
maxperpage=rs.pagesize
RowCount=rs.PageSize
PageNo=PageNo+1
PageNo=PageNo-1
if CINT(PageNo)>1 then
if CINT(PageNo)>CINT(TSum) then
response.Write("对不起没有您想要的页数")
Response.End
end if
end if
if PageNo<0 then
response.Write("没有这一页!")
Response.End
End if
end if
zr130 2005-09-24
  • 打赏
  • 举报
回复
那我把代码放上面你们能帮忙看一下吧,谢谢了,我也是新手,这个分页程序不是我写的,不好意思了
zr130 2005-09-24
  • 打赏
  • 举报
回复
哎,奇怪了,为什么都这么说呢,昨天也试了,就是用REPONSE。WRITE测来的,总是显示1,
那我想问一下,如何才传递过去呢,是因为我设的有问题吗。
ybfqlyq 2005-09-24
  • 打赏
  • 举报
回复
分頁那加個隱藏參數
qfacy 2005-09-24
  • 打赏
  • 举报
回复
翻页PageNo参数没有传递
加载更多回复(2)

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧