【发布时间】:2009-07-17 08:38:33
【问题描述】:
我想打印出数据,用于调试。
数据格式应该是这样的
cntryCode = resArray("COUNTRYCODE")
business = resArray("BUSINESS") ' Payer's business name.
shipToName = resArray("SHIPTONAME")
resArray 本身包含超过 10 条记录。
我试图打印出来,但失败了。
版本 1 不工作
public sub prArray (myarr)
Dim x, ResponseData
For x = 0 to myarr.Count
ResponseData = ResponseData & myarr.Key(x) & " = " & myarr.Item(x) & "<br>"
Next
Response.Write ResponseData
end sub
版本 2 也无法正常工作
public sub prArray (myarr)
Dim x, ResponseData
For x = 0 to UBound(myarr)
ResponseData = ResponseData & myarr(x) & " = " & myarr(x) & "<br>"
Next
Response.Write ResponseData
end sub
我相信肯定有一些方法可以用经典的 asp 打印出来
【问题讨论】:
-
当你说“失败”时——实际发生了什么?
-
你的“resArray”是什么数据类型?
-
无法打印出任何数据。它是分配给 resArray 的 NVP Collection 对象。
标签: arrays asp-classic debugging associative