【发布时间】:2013-09-28 06:12:31
【问题描述】:
我在asp.net网页中创建了一个treeview并将文件系统作为treeview的节点传递。我想知道,如果提供treeview来显示文件结构,它会显示我的本地系统文件结构还是服务器机器文件结构。?
后面的代码:
Array drivesList = DriveInfo.GetDrives();
for (int index = 0; index < drivesList.GetLength(0); index++)
{
string text = drivesList.GetValue(index).ToString();
TreeNode parentNode = new TreeNode(text);
parentNode.PopulateOnDemand = true;
TreeView1.Nodes.Add(parentNode);
}
【问题讨论】:
-
阵列驱动器列表= DriveInfo.GetDrives(); for (int index = 0; index
标签: c# asp.net c#-4.0 treeview treenode