我想绑定asp.net中所有D:\驱动文件夹的gridview?

时间:2010-09-17 05:45:57

标签: asp.net

我想在asp.net中绑定所有D:\ drive文件夹的gridview?并下载文件? 怎么可能?

1 个答案:

答案 0 :(得分:0)

您基本需要2个功能才能前往目录和文件......

System.IO.Directory.GetFiles(CurrentFolderPath, "*");
System.IO.Directory.GetDirectories(CurrentFolderPath, "*");

然后使用通用处理程序(.ashx)来呈现结果(并下载此文件)。

相关问题