我正在尝试创建一个多维数组
到目前为止我所拥有的是...
ArrayList iEFiles = (ArrayList)Session["Files"];
iEFiles.Add(Server.MapPath(FileName));
FileName = "Testing123"
FileName = "AnotherTest"
我想要它做的是让它像这样出来......
FileName = ("Testing123", "Waterproof")
FileName = ("AnotherTest", "Non-Waterproof")
喜欢Array[,]
有任何想法吗?
显示记录... BindGridview(iEFiles);
private void BindGridview(ArrayList list)
{
DataTable dt = new DataTable();
dt.Columns.Add("FileName");
dt.Columns.Add("id");
dt.Columns.Add("snFile");
int c = list.Count;
for (int i = 0; i < c; i++)
{
dt.Rows.Add();
dt.Rows[i]["FileName"] = list[i].ToString().ToUpper();
dt.Rows[i]["id"] = i;
dt.Rows[i]["snFile"] = list[i].ToString();
}
GridView1.DataSource = dt;
GridView1.DataBind();
}