display csv file as attachment vb.net or C#
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开发者_如何学Go 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.
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.
精彩评论