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 上传文件并显示进度条?
基础教程推荐
- Moq It.Is<>不匹配 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
