Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Downloading File For Display in Browser in IE11 and ASP Classic

$
0
0

We're trying to see if our legacy ASP Classic app will run in IE11. (It presently runs fine in Windows 7/IE8.)

One problem we encountered is in downloading files (.xls, .pdf, .msg, .txt, etc.) for display inside IE11. We get the prompt "Do you want to open or save download_asp?mode=dl&id=16879 from someintranet.com?". The prompt is showing the URL of our ASP page with its parameters instead of the usual filename. Our code looks like this:

...
(read blob from database which can be pdf, xls, etc.)
....
If Not objRec.BOF And Not objRec.EOF Then

   lngSize = objRec("document").ActualSize
   objBlob = objRec("document").GetChunk(lngSize)

   Response.ContentType = "application/download"
   Response.AddHeader "Content-disposition","attachment; filename=""" + objRec("file_name") + """"
   Response.BinaryWrite objBlob
...

Thank you.


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>