
Signature
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Hi Dave,
Thank you for posting!
From your description, I assume you're trying to download files from
asp.net website. Please feel free to correct me if there's anything I
missed.
Here's a kb article:
HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;326502
In your case, you may use following code snippets to set the file name:
Response.AddHeader("Content-Disposition",
"attachment;filename=FileName.pdf")
Response.ContentType = "application/pdf"
By the way, for asp.net related issues, I would suggest posting in the
newsgroup below:
microsoft.public.dotnet.framework.aspnet
The reason why we recommend posting appropriately is you will get the most
qualified pool of respondents, and other partners who the newsgroups
regularly can either share their knowledge or learn from your interaction
with us. Thank you for your understanding.
Regards,
Walter Wang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Ben Voigt - 12 May 2006 19:27 GMT
> Hi Dave,
>
[quoted text clipped - 13 lines]
> "attachment;filename=FileName.pdf")
> Response.ContentType = "application/pdf"
If you want the user to be prompted to save the file and not open Acrobat
inside the browser, use "application/octet-stream" instead.
> By the way, for asp.net related issues, I would suggest posting in the
> newsgroup below:
[quoted text clipped - 18 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Walter Wang [MSFT] - 15 May 2006 01:36 GMT
Thank you Ben for pointing out.
Have a nice day.
Regards,
Walter Wang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen - 15 May 2006 18:28 GMT
thank you both of you. filename=FileName.pdf was the magic I needed to know.

Signature
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
> Hi Dave,
>
[quoted text clipped - 35 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Greg Young - 29 May 2006 18:48 GMT
In order to do that you are going to need to rewrite the URL.
if you google on ASP.NET rewrite URL you should get quite a few results :)
The basic process is to create a httpmodule (or httphandler) that internally
redirects the URL.
Cheers,
Greg Young
> thank you both of you. filename=FileName.pdf was the magic I needed to
> know.
[quoted text clipped - 40 lines]
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
Vijay - 03 Aug 2006 21:59 GMT
If you want the user to be prompted to save the file and not open Acrobat
inside the browser, use Response.WriteFile followed by Response.End