C# 怎么上传多张图片到服务器? 请问下各位高手用C#怎么一次性上传多张图片到服务器??我是新生~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //result = Path.GetFileName(uploadfiles.FileName);//获得文件名 string fileEx = Path.GetExtension(uploadfiles.FileName);//获得文件扩展名 saveName = "CR" +"-"+ StringHelper.GetDateTimeString() + fileEx;//实际保存文件名 string phyPath = folder; if (!Directory.Exists(phyPath)) { Directory.CreateDirectory(phyPath); } try { uploadfiles.SaveAs(phyPath + saveName); } catch (Exception e) { throw new ApplicationException(e.Message); }这是上传一张的 多张的也无非就是循环遍历一下uploadfiles.FileNames然后同理执行以上方法 多线程操作ACCESS数据库后关闭时出错,求解!急急急…… DLL 如何调试HOOK回调函数 救命啊 2010新建web项目 刚刚新建就自动关闭了啊 怎样对待异常处理 现在想实现PC向手机发送短信的功能,请高人指教。 能从c#的浏览器组件提取response中的body吗? IIS网站启动问题 InvalidArgument=“0”的值对于“index”无效。 ★★★★★星级问题: 关于菜单和文本框! using System.Management 这名字空间被取消了??我怎么用不了? js 获取repeater中光标所在行 上一行的值 HTML 正则表达式的小问题
string fileEx = Path.GetExtension(uploadfiles.FileName);//获得文件扩展名
saveName = "CR" +"-"+ StringHelper.GetDateTimeString() + fileEx;//实际保存文件名
string phyPath = folder;
if (!Directory.Exists(phyPath))
{
Directory.CreateDirectory(phyPath);
}
try
{
uploadfiles.SaveAs(phyPath + saveName);
}
catch (Exception e)
{
throw new ApplicationException(e.Message);
}
这是上传一张的 多张的也无非就是循环遍历一下uploadfiles.FileNames
然后同理执行以上方法