You need to add a Content-Disposition header to the HTTP Response. Try
this

HttpResponse response;
...
response.AddHeader("Content-Disposition", "attachment;
filename=myfilename.zip");

Deepak

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Chris Sells
> Sent: Tuesday, April 30, 2002 4:27 AM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] Specifying the client-side file name when doing
> Response.WriteFile
>
> I'm redirecting all .zip files on my site to a form to collect the
email
> addresses of down loaders. Then, once they've filled out the form, I
> want to let them get the file, so I'm using Response.WriteFile. The
> problem is that the file name on the client-side defaults to the name
of
> the aspx file doing the work, not the name of the file I just sent
> (although the correct contents are coming across the wire). What's the
> trick for getting the client-side filename to be right?
>
> Chris Sells
> http://www.sellsbrothers.com/
>
> You can read messages from the DOTNET archive, unsubscribe from
DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to