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();
}
}
}
打包源碼下載http://www.dbjr.com.cn/codes/6210.html
相關文章
.Net Core中使用ExceptionFilter過濾器的方法
這篇文章主要介紹了.Net Core中使用ExceptionFilter過濾器的方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-03-03得到真實外網IP、IP所在國家、省份、地區(qū)(小偷程序)
通過正則抓取IP顯示網站中的數據,并篩選出所需要的內容即可。2011-11-11asp.net用url重寫URLReWriter實現任意二級域名 高級篇
Asp.net 用url重寫(URLReWriter)實現任意二級域名,需要的朋友可以參考下,建議先看一下上一篇文章。2009-11-11