在asp.net中,如何显示出server端某个路径下的全部文档? 500' give youleave your email 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void GetFolders(Object sender,EventArgs e,string CurrentFolder){ System.IO.DirectoryInfo di=new DirectoryInfo(CurrentFolder); DirectoryInfo[] diArr; FileInfo[] fiArr; try { diArr = di.GetDirectories(); fiArr = di.GetFiles(); } catch(Exception ex)//空引用 { labErrorMessage.Text=ex.Message; return; } string strTmp; //设置当前目录 labCurrentDir.Text=CurrentFolder; lboData.Items.Clear(); // print out the names of the directories foreach (DirectoryInfo dri in diArr) //显示目录 { strTmp=dri.Name; strTmp+=" <目录>"; lboData.Items.Add(new ListItemstrTmp,dri.FullName)); } foreach (FileInfo fi in fiArr) //显示文件信息 { strTmp=fi.Name; strTmp+=" "+fi.Length.ToString(); strTmp+=" "+fi.LastAccessTime.ToString(); lboData.Items.Add(new ListItem(strTmp,fi.FullName)); } labErrorMessage.Text="";}我写的函数,你自己看看吧! 数据库问题,请大家帮帮忙 请问在2003 上可以用UpdatePanel吗 请教XSLT分页时全部数据重新排序的问题.解决的送 关于<table class="Text"> 在线等! 关于登陆时的校验码 求asp.net做前台搜索按钮跳转到搜索结果页面源码!! “EntityState” 错误问题 2个问题一起问!!!!!!!!!!!!!11 作数据库查询时,怎样实现数据传递 在c#中數組的元素能否是數組? 我的DataGrid怎麽不能分页啊? 改变DATAGRID单元中的CHECKBOX的状态?
{
System.IO.DirectoryInfo di=new DirectoryInfo(CurrentFolder);
DirectoryInfo[] diArr;
FileInfo[] fiArr;
try
{
diArr = di.GetDirectories();
fiArr = di.GetFiles();
}
catch(Exception ex)//空引用
{
labErrorMessage.Text=ex.Message;
return;
}
string strTmp;
//设置当前目录
labCurrentDir.Text=CurrentFolder;
lboData.Items.Clear();
// print out the names of the directories
foreach (DirectoryInfo dri in diArr) //显示目录
{
strTmp=dri.Name;
strTmp+=" <目录>";
lboData.Items.Add(new ListItemstrTmp,dri.FullName));
}
foreach (FileInfo fi in fiArr) //显示文件信息
{
strTmp=fi.Name;
strTmp+=" "+fi.Length.ToString();
strTmp+=" "+fi.LastAccessTime.ToString();
lboData.Items.Add(new ListItem(strTmp,fi.FullName));
}
labErrorMessage.Text="";
}我写的函数,你自己看看吧!