I am using classic asp with vb script. Code to download excel file:
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 firefox or any other bootloader similar to an orbital bootloader. But I get an error in IE 6.0 / 7.0 / 8.0.
Message:
Internet Explorer cannot download myasppage.asp from secure.siteurl.com.
Internet Explorer was unable to open this website. The requested site is either unavailable or cannot be found. Please try again later.
so what will be the problem?
FYI: I pass the query string parameter ysnDownload = 1 to the myasppage.asp page. & Amp; if it is passed then, and only then it will have a ContentType as another application, it will have a default type (text / html).