如何通过 ASP.NET MVC 上传文件并显示进度条?

发布于 2024-07-24 05:39:26 字数 133 浏览 2 评论 0原文

我希望允许用户在 ASP.NET MVC 应用程序中浏览文件并将其上传到服务器。

如果可能的话,我有兴趣添加一个进度条来显示已上传文件的数量。

有人有类似的例子吗? 我应该使用 jQuery 来做到这一点吗?

I'm looking to allow a user to browse and upload a file to the server in my ASP.NET MVC application.

If it is possible, I'm interested in adding a progress bar to show how much of the file has been uploaded.

Does anyone have any examples of something like this? Should I use jQuery to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

傲娇萝莉攻 2024-07-31 05:39:26

ASP.NET MVC 的美妙之处在于您几乎可以选择任何现成的上传组件并毫无问题地使用它。

这个 jQuery 插件是一个不错的选择,我在我的项目中使用了这个插件:
上传

The beauty of ASP.NET MVC is that you can choose almost any out of the box upload component out there and use it without any problems.

This plugin for jQuery is a great choice and one that I use in my projects:
Uploadify

且行且努力 2024-07-31 05:39:26

Steve Sanderson 在他的 上举了一些例子不久前我发现博客很有帮助。 他也有可用的源代码。

Steve Sanderson put some examples on his blog awhile back that I found helpful. He has the source code available as well.

水水月牙 2024-07-31 05:39:26

Uploadify 很好,但是我们不能使用 Flash,所以我们使用 Darren Johnstone 的文件上传控件:

ASP.Net 文件上传/下载模块版本 2
http://darrenjohnstone.net /2008/07/15/aspnet-file-upload-module-version-2-beta-1/

它包括一个完全由 Javascript 驱动的进度条对话框,甚至能够直接上传和下载文件SQL Server 数据库。

Uploadify is nice, but we can't use Flash, so we are using Darren Johnstone's file upload control:

ASP.Net File Upload/Download Module Version 2
http://darrenjohnstone.net/2008/07/15/aspnet-file-upload-module-version-2-beta-1/

It includes a progress bar dialog driven entirely with Javascript, and even has the capability to upload and download files directly to a SQL Server database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文