Ask a Question related to ASP.NET General, Design and Development.
-
DAC #1
HOW-TO: Response.BinaryWrite JPG *WITH* the original filename
Hello.
How can I Respose.BinaryWrite a file but preserving the original filename.
Explaining better:
Suppose a webform that displays images stored on my database. The page
shows, say, 5 pics at a time.
I want the user to be able to right-click over a pic and use "Save Picture
As..." from IE.
But, since the image is "BinaryWritten", the user gets the filename of my
image generator page. I want to force IE to use the original name for the
pic I have stored in my DB.
Besides Context.Response.ContentType = "image/jpg", is there any other
header I have to set?
Thanks in advance,
Daniel
DAC Guest
-
BinaryWrite Problem
Hi All, Please help me regarding the 'Response.BinaryWrite' I am making one web application where I need to store some of client logo's and... -
SSL vs Response.BinaryWrite
I am experiencing much the same thing here using BinaryWrite over SSL. Basically the exact same code that will deliver a PDF to the browser in a... -
Response.BinaryWrite
Hi, How can I output the Response.BinaryWrite content in an asp page that has html tags inside? I need to write the binary data to the client... -
Free Original copy of Never Winter Nights for Linux going! (and its original)
Hi, Yes you read the title correctly, being a complete idiot I ordered 2 copies of nwn from tuxgames, I could of sent it back, but I went on... -
HELP: writing a file to response buffer --> IE shows wrong filename
Hi In an .aspx codebehind file I retrieve a file from a database and write it to the response buffer, so the browser pops up a 'save file' dialog... -
Steve C. Orr, MCSD #2
Re: HOW-TO: Response.BinaryWrite JPG *WITH* the original filename
This line of code should do the trick:
Response.AddHeader("Content-Disposition","inline;filename=myname.jpg");
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"DAC" <tecnolog> wrote in message
news:uNRnCk5VDHA.2016@TK2MSFTNGP09.phx.gbl...> Hello.
> How can I Respose.BinaryWrite a file but preserving the original filename.
>
> Explaining better:
> Suppose a webform that displays images stored on my database. The page
> shows, say, 5 pics at a time.
> I want the user to be able to right-click over a pic and use "Save Picture
> As..." from IE.
> But, since the image is "BinaryWritten", the user gets the filename of my
> image generator page. I want to force IE to use the original name for the
> pic I have stored in my DB.
>
> Besides Context.Response.ContentType = "image/jpg", is there any other
> header I have to set?
>
> Thanks in advance,
> Daniel
>
>
Steve C. Orr, MCSD Guest



Reply With Quote

