请问asp中如何判断一个数组对象是否存在?

stevenzhou 2002-05-12 05:05:15
请问asp中如何判断一个数组对象是否存在?
...全文
565 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
stevenzhou 2002-05-13
  • 打赏
  • 举报
回复
<%
Dim arr1(9)

If IsArray(arr1) Then
Response.Write "array arr1 is exists"
Else
Respones.write "array arr1 is not exists"
End If

response.write "<br>"

If IsArray(arr2) Then
Response.Write "array arr2 is exists"
Else
Respones.write "array arr2 is not exists"
End If

%>

出错信息如下:
本页无法显示
试图访问的网页出现问题,无法显示。

请尝试以下方法:

* 单击 刷新按钮或者梢候再试。
* 打开 localhost 主页,然后查找与所需信息相关的链接。

HTTP 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

技术信息(适用于支持人员)

* 错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
/tks/2.asp, 第 15 行

* 浏览器类型:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2

* 页:
GET /tks/2.asp

* 时间:
2002年5月13日, 12:46:40

* 详细信息:
Microsoft 支持

stevenzhou 2002-05-13
  • 打赏
  • 举报
回复
<%
Dim arr1(9)

If IsArray(arr1) Then
Response.Write "array arr1 is exists"
Else
Respones.write "array arr1 is not exists"
End If

response.write "<br>"

If IsArray(arr2) Then
Response.Write "array arr2 is exists"
Else
Respones.write "array arr2 is not exists"
End If

%>

出错信息如下:
本页无法显示
试图访问的网页出现问题,无法显示。

请尝试以下方法:

* 单击 刷新按钮或者梢候再试。
* 打开 localhost 主页,然后查找与所需信息相关的链接。

HTTP 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

技术信息(适用于支持人员)

* 错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
/tks/2.asp, 第 15 行

* 浏览器类型:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2

* 页:
GET /tks/2.asp

* 时间:
2002年5月13日, 12:46:40

* 详细信息:
Microsoft 支持

tripofdream 2002-05-12
  • 打赏
  • 举报
回复
>>再问一下:如何判断某个session对象是否已经被创建
只能在创建时给session对象赋一不为空的值,然后根据值是否为空来判断,因为session和application对象跟其它对象最大的不同就是前者只要被引用就会被创建.
julyclyde 2002-05-12
  • 打赏
  • 举报
回复
isEmpty判断变量是否使用过
没有isNothing吧?
xxjmz_78 2002-05-12
  • 打赏
  • 举报
回复
就是isarray了
希偌 2002-05-12
  • 打赏
  • 举报
回复
isarray
超级大笨狼 2002-05-12
  • 打赏
  • 举报
回复
If Not IsNothing(obj) Then 对象已经存在
popcode 2002-05-12
  • 打赏
  • 举报
回复
if not IsArray(数组名) then 对象不存在
秋风ss落叶 2002-05-12
  • 打赏
  • 举报
回复
If Not IsNothing(obj) Then 对象已经存在
sjhasp 2002-05-12
  • 打赏
  • 举报
回复
IsArray(数组名)
stevenzhou 2002-05-12
  • 打赏
  • 举报
回复
再问一下:如何判断某个session对象是否已经被创建?

28,409

社区成员

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

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