How can I upload a file via ASP.NET MVC and show a progress bar?(如何通过 ASP.NET MVC 上传文件并显示进度条?)
问题描述
我希望允许用户在我的 ASP.NET MVC 应用程序中浏览文件并将其上传到服务器.
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.
有没有人有这样的例子?我应该使用 jQuery 来执行此操作吗?
Does anyone have any examples of something like this? Should I use jQuery to do this?
推荐答案
ASP.NET MVC 的美妙之处在于,您可以选择几乎任何开箱即用的上传组件,并且毫无问题地使用它.
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.
这个 jQuery 插件是一个不错的选择,也是我在项目中使用的一个:上传
This plugin for jQuery is a great choice and one that I use in my projects: Uploadify
这篇关于如何通过 ASP.NET MVC 上传文件并显示进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何通过 ASP.NET MVC 上传文件并显示进度条?


基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01