[英]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.