简体   繁体   English

在.net中显示文件上载进度

[英]show file upload progress in .net

I have to implement file upload progress bar in one of my project.But,having searched a lot , i am not able to find how to find bytes of file uploaded. 我必须在我的一个项目中实现文件上传进度条。但是,经过大量搜索,我无法找到如何查找上传文件的字节。 Can someone tell me how to find bytes of file uploaded in ASP.NET? 有人能告诉我如何查找在ASP.NET上传的文件的字节数吗?

You might need to use some third party upload control. 您可能需要使用某些第三方上传控件。 Plupload is a nice one you may take a look at. Plupload是一个很好的,你可以看看。

The jquery plugin Uploadify is really good, it has built in progress bars for multiple files and has ability to get progress feedback for custom progress bars. jinery插件Uploadify非常好,它内置了多个文件的进度条,并且能够获得自定义进度条的进度反馈。

Note: Is only possible to get this type of feedback using Flash (and/or Silverlight I believe) without going a heavier route like ActiveX/Java. 注意:只有使用Flash(和/或我相信的Silverlight)才能获得这种类型的反馈,而不会像ActiveX / Java那样使用更重的路径。

Update: 更新:

This is also possible using plain html and javascript, see this jquery plugin for an example: http://jquery.malsup.com/form/ For asp.net mvc also have a look at this: Can i upload file in jquery dialog in asp.net mvc 这也可以使用普通的html和javascript,请看这个jquery插件的例子: http//jquery.malsup.com/form/对于asp.net mvc也看看这个: 我可以在jquery对话框中上传文件asp.net mvc

jQueryFileUpload对我很有用,我在https://github.com/ieb/jQueryFileUpload.Net上有一些ASP.Net绑定

i had this issue in our mvc project a month or two ago. 我在一两个月前在我们的mvc项目中遇到过这个问题。 after fiddling around on the internet and trying a few different implementations, i ended up on the one suggest by steve sanderson using swfupload. 在摆弄互联网并尝试一些不同的实现之后,我最终得到了史蒂夫·桑德森使用swfupload的建议。 http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/ http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/

it will work just fine in 90% of browsers and for the few that don't support flash it falls back nicely. 它可以在90%的浏览器中正常工作,对于少数不支持闪存的浏览器,它可以很好地恢复。 just copy the code and dump it into your project, it worked just fine in our MVC2 project. 只需复制代码并将其转储到您的项目中,它在我们的MVC2项目中运行得很好。

它是ASP的标准上传控件吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM