I am using classic asp with vb script. The code for downloading the excel file is:
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;filename=ExportedData.xls"
Response.Write "<table><tr><td>1</td></tr></table>"
Then it works fine with the firefox, or any other down loader like orbit down loader. But I get error in IE 6.0/7.0/8.0.
The message is:
Internet Explorer cannot download myasppage.asp from secure.siteurl.com.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
so what would be the problem?
FYI: I pass a query string parameter ysnDownload=1 to myasppage.asp page. & if it is passed then and then only it will have the ContentType as application other wise it will have default type (text/html).