在asp.net中实现多文件上传_asp.net技巧
来源:互联网 发布:c语言中绝对值怎么表示 编辑:程序博客网 时间:2024/05/16 13:52
privateBooleanSaveFiles(){//得到File表单元素HttpFileCollectionfiles=HttpContext.Current.Request.Files;try{for(intintCount=0;intCount private Boolean SaveFiles()
{
//得到File表单元素
HttpFileCollection files = HttpContext.Current.Request.Files;
try
{
for(int intCount= 0; intCount< files.Count; intCount++)
{
HttpPostedFile postedFile = files[intCount];
string fileName, fileExtension;
//获得文件名字
fileName = System.IO.Path.GetFileName(postedFile.FileName);
if (fileName != "")
{
//获得文件名扩展
fileExtension = System.IO.Path.GetExtension(fileName);
//可根据不同的扩展名字,保存文件到不同的文件夹
//注意:可能要修改你的文件夹的匿名写入权限。
postedFile.SaveAs(System.Web.HttpContext.Current.Request.MapPath("upFiles/") + fileName);
}
}
return true;
}
catch(System.Exception Ex)
{
return false;
}
}
- 在asp.net中实现多文件上传_asp.net技巧
- asp.net中多彩下拉框的实现_asp.net技巧
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传(C#)
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传
- 在ASP.NET中实现多文件上传-孟宪会
- 在ASP.NET中实现多文件上传
- Winform中,DataGridView操作小集锦
- android--broadcast(广播)
- 基于ASP的个人博客设计与实现(毕业设计 论文+源代码)
- One or more breakpoints cannot be set and have been disable.Execution will stop at the begining of the programe
- ASP.NET技巧:教你制做Web实时进度条
- 在asp.net中实现多文件上传_asp.net技巧
- ARMV4, ARMV4I, ARMV4T 区别
- 素数环问题
- Java Interface
- 类似于QQ游戏百万人同时在线的服务器架构实现
- 为什么不能在右键“打开方式”里选择“选择程序”
- SQL 中锁的介绍
- C#---public-private-protected-internal
- unicast multicast broadcast的区别