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

How can I upload a file via ASP.NET MVC and show a progress bar?(如何通过 ASP.NET MVC 上传文件并显示进度条?)
本文介绍了如何通过 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 上传文件并显示进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

What is the difference between Funclt;string,stringgt; and delegate?(Funclt;string,stringgt; 有什么区别?和委托?)
What is the difference between lt;%: and lt;%= in ASP.NET MVC?(ASP.NET MVC 中的 lt;%: 和 lt;%= 有什么区别?)
linq query for tag system - search for multiple tags(标签系统的 linq 查询 - 搜索多个标签)
Forum tags. What is the best way to implement them?(论坛标签.实施它们的最佳方法是什么?)
html script tag not using type javascript lt;script type=quot;text/htmlquot;gt;?(html 脚本标签未使用类型 javascript lt;script type=quot;text/htmlgt;gt;?)
ASP.NET Control to HTML tag equivalent(ASP.NET 控件到 HTML 标记等效)