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

每天坐在教室里,但眼神总是看着窗外的风景,不知不觉的默默发呆。我一直急速前行,穿梭于人人之间。试图借应接不暇的风景让我褪去对你的思念。

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();
} }
}

打包源码下载//www.haodaima.com/codes/6210.html

以上就是asp.net web大文件上传带进度条实例代码。生活不可能一帆风顺,总会有波折,总会有险阻,生活是个爱开玩笑的孩子,也许今天给你所有,明天又会让你一无所有,无需烦恼,该来的总会来,再黑的夜晚也会有黎明到来的那一刻,不管生活有多么曲折,只要拥有幸福的态度就能挺过漫漫长夜,就能迎来美好的明天。更多关于asp.net web大文件上传带进度条实例代码请关注haodaima.com其它相关文章!

您可能有感兴趣的文章
ASP.NET中Response.BufferOutput属性的使用技巧

ASP.NET轻量级MVC框架Nancy的基本用法

使用grpcui测试ASP.NET core的gRPC服务

ASP.NET Core中的对象池介绍

.NET集成ORM框架HiSql