httpresponse.contenttype help needed

  • Thread starter Thread starter Matthew Speed
  • Start date Start date
M

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
 
Matthew,

Can you show us something more how you do this.

Cor
 
Matthew said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top