当前位置: 首页 > 工具软件 > NeatUpload > 使用案例 >

neatupload 控件上传大文件

邹野
2023-12-01

web.config:

在system.web节点下添加:

<httpModules>
			<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule,Brettle.Web.NeatUpload"/>
		</httpModules> 

前台:

<Upload:InputFile ID="flzyaddress" runat="server" /> <br />
                    <Upload:ProgressBar ID="ProgressBar1" runat="server" Inline="true" Height="30px" Width="600px" Triggers="aa">
                    </Upload:ProgressBar>


后台:

string path = Server.MapPath("/download/");
                     string FileName = this.flzyaddress.FileName;//获取上传文件的文件名,包括后缀  
                    string ExtenName = System.IO.Path.GetExtension(FileName);//获取扩展名 
                    zyaddress = System.IO.Path.Combine(path, DateTime.Now.Ticks.ToString() + ExtenName);//合并两个路径为上传到服务器上的全路径 
                    flzyaddress.MoveTo(zyaddress, Brettle.Web.NeatUpload.MoveToOptions.Overwrite);   


 

 

1、IIS7中,托管管理模式必须为经典
2、ISAPI和CGI限制中必须全设置成启动状态

 类似资料: