DBMNG数据库管理与应用

书籍是全世界的营养品。生活里没有书籍,就好像没有阳光;智慧里没有书籍,就好像鸟儿没有翅膀。
当前位置:首页 > 服务器配置 > IIS&ASP

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

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



本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号