Forcing a Download Dialog to Display(soliddotnet.com)
submitted by
neerajmathur(130) 2 years, 8 months ago
If your browser is capable of rendering the content type (or has a plugin that does
so), it will render the binary content when you click on a link to the handler.
However , if you’d prefer to have a Download dialog appear instead, you need to set the
Content-Disposition header like so:
Response.AddHeader("Content-Disposition",
"attachment; filename=\"MyFile.doc\"");
This code will display a File Save dialog in which the filename is defaulted to MyFile.doc.
UA:F [1.6.3_896]
|category: C#
|Views: 9
tags:
C# another
Everyones tags:
Your Tags: