I want to prompt the user to Save or Cancel a download of an excel file using the following asp.net code. The file opens up as a spreadsheet instead of prompting the user to Save which I would like. Any suggestions would be welcome.
Dim fs As FileStream
Dim strcontenttype As String
Dim strpath = "\\server1\Folder1\"
Dim strfilename As String = "file1.xls"
fs = File.Open(strpath & strfilename, FileMode.Open)
Dim bytbytes(fs.Length) As Byte
fs.Read(bytbytes, 0, fs.Length)
Response.AddHeader("content-dispostion", "attachment; filename=" & strfilename)
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = "UTF-8"
Response.ContentType = ContentType