如何上传多个附件? [英] How to upload multiple attachments?

查看:211
本文介绍了如何上传多个附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI
我需要一次上传多个文件的帮助,我可以一次上传一个文件并保存在数据库中.我将如何上传多个文件?与附件一样,上载file1,file2,file3等,而不是一次选择一个文件并等待其上载并另存为附件,然后转到下一个文件.我将文件名,contenttype,contentlenght和日期保存到数据库中,如果我一次上传许多文件,如何将它们保存在数据库中?目前,我正在使用Asp.net上载控件进行浏览,选择一个文件,然后单击一个按钮,一旦单击该按钮,就会将该文件上载到我的上载文件夹并将上述信息保存在数据库中.

HI
I need some help on uploading multiple files at once, i can upload one at a time and save in database. How would i go about uploading multiple files? Like in the case of attachments, upload file1, file2, file3 and so on instead of selecting one file at a time and waiting for it to upload and save as an attachment and then going onto the next one. I save the filename, contenttype,contentlenght and date to the database, if im uploading many files at once, how do i save them in my database? At the moment im using the Asp.net upload control to browse, select a file and then i click a button that once clicked uploads that file to my uploads folder and saves the info above in the database.

推荐答案

从MSDN中进行检查:在ASP.NET 2.0中上传文件 [ ^ ]
向下滚动到同时上传多个文件"部分

希望这对您有帮助!
Check this from MSDN: Uploading Files in ASP.NET 2.0[^]
Scroll down to the section - "Uploading Multiple Files at the Same Time"

Hope this helps!


最好的选择是对其进行3方控制.您可以通过3种党性控制来完成这项工作.

如果您不想使用3方控件,则必须创建自己的控件.

我建议您去看看通用处理程序文件,我认为他们可以为您完成这项工作,但不确定.

希望有帮助.
Best option is to go 3 party control for it. There are lots of 3 party controls by which you can do this job.

If you don''t want to use 3 party control then you have to create your own control.

I suggest you go look at Generic handler file, i think they can do the job for you, but not sure of it.

Hope this help.


这篇关于如何上传多个附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆