首页 > Web开发 > 详细

asp.net web大文件上传带进度条实例代码

时间:2016-08-12 00:39:54      阅读:241      评论:0      收藏:0      [点我收藏+]
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using System.IO; 
using System.Collections.Generic; 
using System.Web.Configuration; 

public partial class upload : System.Web.UI.Page 
{ 
protected void Page_Load(object sender, EventArgs e) 
{ 
try 
{ 
// Get the data 
HttpPostedFile jpeg_image_upload = Request.Files["Filedata"]; 

jpeg_image_upload.SaveAs(System.Web.HttpContext.Current.Server.MapPath("~/upload/") + jpeg_image_upload.FileName); 

Response.StatusCode = 200; 
Response.Write("文件处理完毕!"); 
} 
catch 
{ 
// If any kind of error occurs return a 500 Internal Server error 
Response.StatusCode = 500; 
Response.Write("未知错误!"); 
} 
finally 
{ 
// Clean up 
Response.End(); 
} 

} 
} 

  

asp.net web大文件上传带进度条实例代码

原文:http://www.cnblogs.com/njccqx/p/5763087.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!