文件上传与其他领域表单的一部分 [英] File Upload as Part of Form with Other Fields

查看:123
本文介绍了文件上传与其他领域表单的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET MVC的网站。我需要一个页面,用户必须输入几个领域,包括图像文件。

I have an ASP.NET MVC website. I need a page where the user must enter several fields, including an image file.

我能找到上传使用MVC的文件很多,很多引用。但他们不将文件上传与其它字段的表格的一部分。

I could find many, many references for uploading a file using MVC. But they don't upload the file as part of a form with other fields.

理想情况下,字段和文件将被发送到一个控制器。任何提示?

Ideally, fields and file will be sent to a single controller. Any tips?

推荐答案

您可以使用 FineUploader 见演示

Valums上传。它采用纯JavaScript(使用iframe上传文件)

Valums Uploader. It uses pure Javascript (uploads file using Iframe)

您可能需要使用客户端插件。 Plupload 是一种可能的选择。和<一个href=\"http://stackoverflow.com/questions/4444955/how-to-use-the-plupload-package-with-asp-net-mvc/4447694#4447694\">here's如何你可以在你的MVC应用程序将它集成一个例子。支持此功能的另一种流行的插件是 Uploadify

You might need to use a client plugin. Plupload is one possible choice. And here's an example of how you could integrate it in your MVC application. Another popular plugin which supports this functionality is Uploadify.

Asp.net MVC 3文件上传使用在fileapi

看到进步演示1,2及3在 http://jquery.malsup.com/form/#file-upload

See Progress Demo 1, 2 & 3 at http://jquery.malsup.com/form/#file-upload

参考:<一href=\"http://forums.asp.net/t/1897410.aspx/1?MVC4%20File%20Upload\">http://forums.asp.net/t/1897410.aspx/1?MVC4+File+Upload

这篇关于文件上传与其他领域表单的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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