http download file name

后端 未结 3 1346
南笙
南笙 2020-12-02 19:55

May i know how to assign a file-name to a a-href file download.

get-file&l         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 20:37

    You need to append the HTTP response header "Content-Disposition"

    Response.AppendHeader("content-disposition", "attachment; filename=\"" + fileName +"\"");
    

提交回复
热议问题