Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return a file to download
Message
From
12/02/2002 17:45:41
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Return a file to download
Miscellaneous
Thread ID:
00619207
Message ID:
00619207
Views:
40
I am querying Informix and getting a record set. Then I loop through the RS and at the same time build an HTML table and (customer's requirement) a string to return a CSV file.

I display the table with a series of Response.Write
For the filename.csv I could do:
Response.ContentType = "application/download"
Response.AddHeader "Content-Disposition","attachment;filename=" & cFile
where cFile is a random filename that contains my cOutput string.

This of course generates an error on the Response.ContentType line as the browser already has something written.

How do I deal with this requirement? Do I send them to another page that does the download?


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Next
Reply
Map
View

Click here to load this message in the networking platform