基本信息
源码名称:NeatUpload-1.2.32 实例+源码下载
源码大小:0.74M
文件格式:.rar
开发语言:C#
更新时间:2015-04-10
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
/* NeatUpload - an HttpModule and User Controls for uploading large files Copyright (C) 2005 Dean Brettle This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.IO; namespace Brettle.Web.NeatUpload { public class MultipleBars : System.Web.UI.Page { protected HtmlForm form; protected InputFile inputFile1; protected Button submitButton1; protected Button cancelButton1; protected ProgressBar inlineProgressBar1; protected InputFile inputFile2; protected Button submitButton2; protected Button cancelButton2; protected ProgressBar inlineProgressBar2; protected Button submitButton3; protected HtmlGenericControl bodyPre; protected override void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.Load = new System.EventHandler(this.Page_Load); } private void Page_Load(object sender, EventArgs e) { submitButton1.Click = new System.EventHandler(this.Button_Clicked); submitButton2.Click = new System.EventHandler(this.Button_Clicked); submitButton3.Click = new System.EventHandler(this.Button_Clicked); } private void Button_Clicked(object sender, EventArgs e) { if (!this.IsValid) { bodyPre.InnerText = "Page is not valid!"; return; } bodyPre.InnerText = ""; if (inputFile1.HasFile) { /* In a real app, you'd do something like: inputFile.MoveTo(Path.Combine(Request.PhysicalApplicationPath, inputFile.FileName), MoveToOptions.Overwrite); */ bodyPre.InnerText = "File #1:\n"; bodyPre.InnerText = " Name: " inputFile1.FileName "\n"; bodyPre.InnerText = " Size: " inputFile1.ContentLength "\n"; bodyPre.InnerText = " Content type: " inputFile1.ContentType "\n"; } if (inputFile2.HasFile) { /* In a real app, you'd do something like: inputFile2.MoveTo(Path.Combine(Request.PhysicalApplicationPath, inputFile2.FileName), MoveToOptions.Overwrite); */ bodyPre.InnerText = "File #2:\n"; bodyPre.InnerText = " Name: " inputFile2.FileName "\n"; bodyPre.InnerText = " Size: " inputFile2.ContentLength "\n"; bodyPre.InnerText = " Content type: " inputFile2.ContentType "\n"; } } } }