問題描述
我希望允許用戶在我的 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 上傳文件并顯示進度條?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!