I have a webpage that pulls information from a database, converts it to .csv format, and writes the file to the HTTPResponse.
string csv = GetCSV();
Respon
I believe this will work for you.
Response.AddHeader("content-disposition", "attachment; filename=NewFileName.csv");
You just need to set the Content-Disposition header
Content-Disposition: attachment; filename=data.csv
This Microsoft Support article has some good information
How To Raise a "File Download" Dialog Box for a Known MIME Type
Add a "Content-Disposition" header with the value "attachment; filename=filename.csv".
Response.AddHeader("content-disposition", "attachment; filename=File.doc")