asp.net web大文件上传带进度条实例代码
更新时间:2008年10月17日 00:09:59 作者:
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();
}
}
}
打包源码下载https://www.jb51.net/codes/6210.html
相关文章
ASP.NET笔记之页面跳转、调试、form表单、viewstate、cookie的使用说明
ASP.NET笔记之页面跳转、调试、form表单、viewstate、cookie的使用说明2013-04-04
asp.net根据计算机MAC地址限定每台机子只能领取一次账号
这里只做简单演示过程,请根据您的实际情况作适当修改!另外我的博客只做自己参考查询方便用,请各位大神不要没事喷我,知道您的技术高,我是新手正在努力学习当中,谢谢2012-06-06
在Global.asax文件里实现通用防SQL注入漏洞程序(适应于post/get请求)
可使用Global.asax中的Application_BeginRequest(object sender, EventArgs e)事件来实现表单或者URL提交数据的获取,获取后传给SQLInjectionHelper类ValidUrlData方法来完成检查2013-01-01


最新评论