Filename of picture retrieved from database?

G

grz01

Hi,

I have written a webpage, showpict.aspx,
in C# that will fetch a jpg-picture from a database
and display it thru a html-tag like:

<img src="showpict.aspx?id=23">

where the 'id' parameter tells what picture from the
db to display.

Problem is, if the user e.g. rightclicks the picture
in the web-brower, then does 'Save Picture as...'
the suggested file-extension is wrong.
IE6 will suggest the filename: untitled.bmp
while Firefox simply suggests: showpict.aspx.

Q: How can I get the browser to suggest a name ending with .jpg?
I have seen this work as desired on other sites...

Is there a http-header to do this trick or what?

Thanks,
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Are you especifynng the correct content type?

cheers,
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top