Home All Groups Group Topic Archive Search About

httpresponse.contenttype help needed

Author
4 Apr 2005 5:48 AM
Matthew Speed
I have a web page that returns to the user a csv list they then import
into another program.  When they do so they are correctly told that
the server is attempting to send data of type text/csv and gives them
the option to save it.  Unfortunately, the suggested file name is
dataexport.aspx, the name of my VB.Net page.  Is there a way I can
make it so that the dialog box autofills as dataexport.csv instead?

TIA

Author
4 Apr 2005 6:43 AM
Cor Ligthert
Matthew,

Can you show us something more how you do this.

Cor
Author
4 Apr 2005 7:50 AM
Andrew Morton
Matthew Speed wrote:
> I have a web page that returns to the user a csv list they then import
> into another program.  When they do so they are correctly told that
> the server is attempting to send data of type text/csv and gives them
> the option to save it.  Unfortunately, the suggested file name is
> dataexport.aspx, the name of my VB.Net page.  Is there a way I can
> make it so that the dialog box autofills as dataexport.csv instead?
>
> TIA

This deals with the content-disposition header:-
http://www.faqs.org/rfcs/rfc2183.html

Response.AddHeader("Content-Disposition",
"attachment;filename="dataexport.csv")

Andrew