关于asp网页的购物车问题

suekey 2005-03-25 10:28:43
请交一个问题,我的关于购物车的网页代码如下但是运行后,提示第八行有类型不匹配的错误
见下
谢谢大家帮我看哈
不胜感激啊
<!--#include file="includes/header.inc"-->
<%
dim arrCart, cartIndex,i,total0,total1
arrCart = Session("MyCart")
cartIndex = Session("cartIndex")
count=0
for i=0 to CartIndex
if arrCart(i,2)<>"" then
if arrCart(i,2)>0 then
count=count+1
end if
end if
next
if count = 0 then
htmlcode="your cart is empty.<br>"
htmlcode=htmlcode&"<a href=""bookincategory.asp""><<back</a>"
response.write htmlcode
else
%>

错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配
/netshop/showcart.asp, 第 8 行
...全文
117 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
jarraytan 2005-03-26
  • 打赏
  • 举报
回复
哪是第八行啊?
LW1981 2005-03-26
  • 打赏
  • 举报
回复
就是樓上說的問題!session變量不是數組!是一個字符串!如果按你的想法,應該用 split()函數把它拆開。
lstup 2005-03-26
  • 打赏
  • 举报
回复
Session("MyCart")是数组对象?

28,406

社区成员

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

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