Solution needed for outputting status of processed files with MVC 3
I have to functions for handling processing of files in a director开发者_如何学Pythony.
One function reads and counts the files in the directory and foreach file it calls a function that does some action on that file.
What i need is how to update a DIV tag everytime a file is processed. The files are done in sync and is startet by calling the first function.
Right now i return a partialview, but it first return when alle the files are done. As there can be up to 1000 files, i would like to give the user somekind of progress information.
Kind regards \T
Here is one example of Copying file file with a progress status.. You can modify this as per your requirement. If you wish to show the progress you can use ajax or JSON with a jQuery timer which requests number of files of destination folder.
精彩评论