Download File - Asp.net MVC with Jquery

前端 未结 3 2039
轻奢々
轻奢々 2021-01-15 20:50

Am dowloading a file using JQUERY MVC. User clicks on button and am downloading the File looks as simple as it is.

My Jquery Event

$         


        
3条回答
  •  轮回少年
    2021-01-15 20:59

    The way that the user interacts with file downloads should be left up to the browser.

    In your example, your UI will tell them that the file is downloading, when in fact the browser will do the same thing.

    You should simply use an anchor with the href set to the download location:

     Download 
    

提交回复
热议问题