码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2016-08-12 00:42:02      阅读:150      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!