mar*_*zzz 2 .net c# filesystems drop-down-menu
我需要在Web用户控件(.NET 4.0,C#,Web窗体)中创建下拉列表.
此列表应该是MyPages文件夹中的.aspx列表到我的Web应用程序中.
我该如何创建它?我需要读取文件夹 - >文件还是有更好的方法?
这样的事情应该有效:
DirectoryInfo directoryInfo = new DirectoryInfo(Server.MapPath("/MyPages"));
FileInfo[] fileinfo = directoryInfo.GetFiles("*.aspx");
// do data binding here
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
240 次 |
| 最近记录: |