您目前尚未登陆,请选择【登陆】或【注册
首页->上传下载->Asp.net+Flash实现无刷新上传>>App-Code/Upload.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net+Flash实现无刷新上传
当前文件:文件类型 FlashUpload/App_Code/Upload.cs打开代码结构图
普通视图
		            
1// According to http://msdn2.microsoft.com/en-us/library/system.web.httppostedfile.aspx 2// "Files are uploaded in MIME multipart/form-data format. 3// By default, all requests, including form fields and uploaded files, 4// larger than 256 KB are buffered to disk, rather than held in server memory." 5// So we can use an HttpHandler to handle uploaded files and not have to worry 6// about the server recycling the request do to low memory. 7// don't forget to increase the MaxRequestLength in the web.config. 8// If you server is still giving errors, then something else is wrong. 9// I've uploaded a 1.3 gig file without any problems. One thing to note, 10// when the SaveAs function is called, it takes time for the server to 11// save the file. The larger the file, the longer it takes. 12// So if a progress bar is used in the upload, it may read 100%, but the upload won't 13// be complete until the file is saved. So it may look like it is stalled, but it 14// is not. 15 16//该源码下载自www.51aspx.com(51aspx.com) 17//5_1_a_s_p_x.c_o_m 18 19using System; 20using System.Data; 21using System.Configuration; 22using System.Web; 23using System.Web.Security; 24using System.Web.UI; 25using System.Web.UI.WebControls; 26using System.Web.UI.WebControls.WebParts; 27using System.Web.UI.HtmlControls; 28using System.IO; 29 30/// <summary> 31/// Upload handler for uploading files. 32/// </summary> 33public class Upload : IHttpHandler 34{ 35 public Upload() 36 { 37 } 38 39 IHttpHandler Members 116} 117
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net+Flash实现无刷新上传
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号