您目前尚未登陆,请选择【登陆】或【注册
首页->上传下载->51aspx大文件上传并显示进度和上传速率示例及组建源码>>WebbUploadSample/MutilFilesUpload.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:51aspx大文件上传并显示进度和上传速率示例及组建源码
当前文件:文件类型 LargeFileUpload/WebbUploadSample/MutilFilesUpload.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Collections; 3using System.ComponentModel; 4using System.Data; 5using System.Drawing; 6using System.Web; 7using System.Web.SessionState; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.HtmlControls; 11using Webb.WAVE.Controls.Upload; 12using System.IO; 13 14namespace WebbUploadSample 15{ 16 /// <summary> 17 /// Summary description for MutilFilesUpload. 18 /// </summary> 19 public partial class MutilFilesUpload : System.Web.UI.Page 20 { 21 22 protected void Page_Load(object sender, System.EventArgs e) 23 { 24 // Put user code to initialize the page here 25 } 26 27 Web Form Designer generated code 46 47 protected void Button1_Load(object sender, System.EventArgs e) 48 { 49 Button m_button = sender as Button; 50 WebbUpload m_upload = new WebbUpload(); 51 m_upload.RegisterProgressBar(m_button); 52 } 53 54 protected void Button1_Click(object sender, System.EventArgs e) 55 { 56 string m_path = Path.Combine(MapPath("."),"UploadedFiles"); 57 WebbUpload m_upload = new WebbUpload(); 58 UploadFileCollection m_files = m_upload.GetUploadFileList("m_file"); 59 string m_filePath = string.Empty; 60 this.Label1.Text = "Uploaded file:<br/>"; 61 foreach(UploadFile m_file in m_files) 62 { 63 if(m_file.FileName==null||m_file.FileName==string.Empty) continue; //skip the empty input file. 64 m_filePath = Path.Combine(m_path,m_file.FileName); 65 m_file.SaveAs(m_filePath); 66 this.Label1.Text += "<a href='uploadedFiles\\"+m_file.FileName+"'>uploadedFiles\\"+Path.GetFileName(m_file.ClientFullPathName)+"</a><p>"; 67 } 68 } 69 } 70} 71
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:51aspx大文件上传并显示进度和上传速率示例及组建源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号