Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return a file to download
Message
De
12/02/2002 17:45:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Return a file to download
Divers
Thread ID:
00619207
Message ID:
00619207
Vues:
41
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform