[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

prompt open/save csv file

i have code written in asp to prompt user to open/save csv file format. it works fine on my local pc but once transfer to live server. the file format turns out to become asp instead of csv when i download the file. what is goin on?
Response.ContentType ="application/vnd.ms-excel"
Response.AddHeader "content-disposition","filename=export.csv"
0
angelmist
Asked:
angelmist
  • 3
2 Solutions
 
_Stilgar_Commented:
Can you paste all the relevant code?

Stilgar.
0
 
_Stilgar_Commented:
In the meantime, try Response.ContentType = "application/octet-stream".

Stilgar.
0
 
anthonywjones66Commented:
Response.AddHeader "content-disposition","filename=export.csv; attachment"

Anthony.
0
 
_Stilgar_Commented:
hongjun,

I participated in this question, and as far as I know the solution I gave should do the trick. I'm asking for a points split.

Stilgar.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now