Restoring original filename on BLOB downlaods

  • Thread starter Thread starter Picho
  • Start date Start date
P

Picho

Hi all,

I am storing binary files on MS-SQL server. my file record includes the
original filename.
I have created a web application for downloading those saved files and it
works ok besided one small issue:
when I select save-as to save my file from the web-app to the local disk,
the file gets a default filename in the form of <aspx page name>.<original
extension>

how can I restore the original filename?

thanx,

Picho
 
Add a header in your ASPX page something like:

Response.AddHeader("Content-Disposition", "attachment; filename=" +
yourFileName);

You will need to do this before any content is sent back to the browser --
say in the Page_Load method.
 
Thanx a lot it works great!

Picho


Manohar Kamath said:
Add a header in your ASPX page something like:

Response.AddHeader("Content-Disposition", "attachment; filename=" +
yourFileName);

You will need to do this before any content is sent back to the browser --
say in the Page_Load method.
 
Back
Top