Exporting to a csv from ASP
Posted on 2003-11-13
I have a web app that generates html reports. After I generate the reports I go ahead and create a csv file for the reports behind the scenes and save the csv file on the server.
On the report page, at the bottom, there's a button "export" that when a user clicks on it would bring up a "file download" dialog box and lets the user save the csv file on their machine. This works fine on win 2000 but on windows 98 and window xp, the csv file gets opened within the browser. Is there a way to prevent that from happening??
Here is the code for the "export" button....
<a href="../Reports/Exports/test.csv"><img type="image" alt="Export" src="../images/export.gif"></a>