I have to implement file upload progress bar in one of my project开发者_JS百科.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?
You might need to use some third party upload control. Plupload is a nice one you may take a look at.
Try this:
http://mattberseth.com/blog/2008/07/aspnet_file_upload_with_realti_1.html
jQueryFileUpload works well for me, I have some ASP.Net bindings at https://github.com/i-e-b/jQueryFileUpload.Net
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.
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.
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
i had this issue in our mvc project a month or two ago. after fiddling around on the internet and trying a few different implementations, i ended up on the one suggest by steve sanderson using swfupload. 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. just copy the code and dump it into your project, it worked just fine in our MVC2 project.
Is it the standard upload control with ASP?
精彩评论