jquery tabs中实现多文件上传控制
我使用 asp.net mvc 2。我有三个 jquery 选项卡。在三个选项卡中的每一个中,我想上传多个文件并保存在服务器上。最好的方法是什么 我也想实现 ajax 基本文件上传
Im using asp.net mvc 2. I have three jquery tabs. In each of three tabs i want to upload multiple files and save on server. what may be the best approach to do this also i want to implement ajax base file upload
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该有助于 AJAX 文件上传。对于多个文件上传,快速谷歌会显示jquery 多文件插件。
This should help with the AJAX file upload. For multiple file uploads, a quick google shows the jquery multifile plugin.
Uploadify 基于 flash 和 表单插件 功能更强大一些,因为它可以与其他表单元素一起执行操作。有大量的 jquery 插件可以满足您的需求。我建议谷歌搜索“jquery ajax uploads”并尝试向您提供的不同选项,看看哪一个适合您的项目。
编辑
这是我在使用表单插件在文本区域中返回响应时使用的代码。
这是上传操作:
然后这是
FileUploadJSONResult
:然后这里是启动和处理上传的实际 jquery 调用:
Uploadify is based on flash and Form Plugin is a little more powerful as it can do things with other form elements. There are a ton of jquery plugins out there that will do what you want. I suggest googling 'jquery ajax uploads' and trying out the different options presented to you to see which on will fit with your project.
EDIT
Here is the code I use when using the form plugin to return the response in a textarea.
Here's the upload action:
Then here is the
FileUploadJSONResult
:Then here is the actual jquery call to start and handle the upload: