Question

I have a csv file as an attachment to the inbox.

They should be able to view the attachment when they click on the link, but how do I display them the csv attachments??! the browser just parses it and displays the content instead of poping the open/save window.

anyone had to open a csv file as an attachment on web before? thanks.

Was it helpful?

Solution

Response.AddHeader "content-disposition","attachment; filename=myfile.csv"

Adding this header to your response will cause the browser to treat the content as an attachment and display the 'File Download' dialog instead of attempting to display the content in the web page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top