[英]Unable to get header "Content-Disposition" with httpclient in C#
[英]Alternative to Content-Disposition in HTTP Header (c#)
是否可以使用“ attachment; filename = ...” 替換 Content-Disposition?
我正在發送一個實時exe文件流,希望瀏覽器在我開始發送時打開“另存為”或“運行”。
我正在使用C#HttpResponseHeader,並希望使用其成員或HttpWorkerRequest成員。
謝謝,Moshe
Content-Disposition
是使瀏覽器提示用戶保存文件的正確方法。 使用HttpResponse.AppendHeader()
添加標頭值,例如:
Response.AppendHeader("Content-Type", "...")
Response.AppendHeader("Content-Disposition", "attachment; filename=...")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.