asp数组理解问题

来源:百度知道 编辑:UC知道 时间:2024/05/17 00:03:52
<%
'这个方法得到的是一个二维数组。
'arrRs(字段值,记录集序列)
dim arrRs
arrRs = rs.GetRows()
session("rs") = arrRs
'使用方法
dim arrRs
arrRs = session("rs")
if isarray(arrRs) then
response.write rs(1,0)
end if
'使用for
dim i
for i = 0 to ubound(arrRs, 2)
response.write arrRs(0,i)
next
%>

怎样理解上面这段程序,ubound(arrRs, 2) 为什么括号后面是2,而不是其它?arrRs(0,i) 这个又怎样解释?

if isarray(arrRs) then
response.write rs(1,0)
end if 这一段又是什么意思?

好晕,数组概念怎这么复杂!!!

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Jg_yjwhck.aspx.cs" Inherits="jg_Jg_yjwhck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="· 新增 ·" /><br />
<asp:GridView ID="GridView1" runat=&q