<body bgcolor="skyblue">
<form id="form1" runat="server">
<%
int loopl;
NameValueCollection coll = Request.Form;
string[] arr1 = coll.AllKeys;
string[] arr2 = coll.GetValues(arr1[0]);
Response.Write("用户名为:" + arr2[0] + "<br>");
for (int i = 1; i < 11; i++)
{
arr2 = coll.GetValues(arr1[i]);
Response.Write(i + arr2[0] + "<br>");
}
%>
</form>
</body>
运行时显示
string[] arr2 = coll.GetValues(arr1[0]);
索引超出了数组界限
<form id="form1" runat="server">
<%
int loopl;
NameValueCollection coll = Request.Form;
string[] arr1 = coll.AllKeys;
string[] arr2 = coll.GetValues(arr1[0]);
Response.Write("用户名为:" + arr2[0] + "<br>");
for (int i = 1; i < 11; i++)
{
arr2 = coll.GetValues(arr1[i]);
Response.Write(i + arr2[0] + "<br>");
}
%>
</form>
</body>
运行时显示
string[] arr2 = coll.GetValues(arr1[0]);
索引超出了数组界限
解决方案 »
- 用winfrom做一个语音识别,识别后将识别的东西放入文本框中,求实例一个谢谢,可以发到qq邮箱[email protected]
- 图片算法的一个问题~
- 请教一个分组算法
- System.Media.SoundPlayer 问题
- 100分求超难的自动网站模板建立,动态创建控件.然后替换.
- 初学,问两个问题..........
- Remoting Client无法完成续约,总断开,怎么解决?
- 求c#存取图片的问题
- tablelayoutpanel的问题!
- 我昨天下载了.NET Framework Software Development Kit Version 1.1
- 转义序列中\r和\n的区别是什么?
- 求教个问题:vs 2005 中datagridview 编辑列 的对话框太小!
NameValueCollection coll = Request.Form;
string[] arr1 = coll.AllKeys;
ArrayList list = new ArrayList();
//循环将参数值放入ArrayList
for (int i = 0; i < arr1.Length; i++)
{
String[] values = coll.GetValues(arr1[i]);
for (int j = 0; j < values.Length; j++)
{
list.Add(values[j]);
}
}