![]() |
|
|
|||||||
![]() |
ASP Net - Filename of picture retrieved from database? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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, grz01@spray.se |
|
|
|
|
#2 |
|
Posts: n/a
|
Try :
http://support.microsoft.com/kb/260519/en-us -- <> a écrit dans le message de news: oups.com... > > 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, > Patrice |
|
|
|
#3 |
|
Posts: n/a
|
Response.AddHeader("Content-Disposition", "inline;filename=test.jpg")
Here are more details: http://steveorr.net/articles/EasyUploads.aspx -- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net <> wrote in message news: oups.com... > > 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, > Steve C. Orr [MVP, MCSD] |
|
|
|
#4 |
|
Posts: n/a
|
Hi,
Are you especifynng the correct content type? cheers, -- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation <> wrote in message news: oups.com... > > 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, > Ignacio Machin \( .NET/ C# MVP \) |
|
|
|
#5 |
|
Posts: n/a
|
Yes, that's just what I needed!
Thanks Steve! >Response.AddHeader("Content-Di*>sposition", "inline;filename=test.jpg") > >Here are more details: >http://steveorr.net/articles/E*asyUploads.aspx grz01@spray.se |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| anamorphic enhancement on anchor bay dvd's | jamestk9888@webtv.net | DVD Video | 46 | 10-10-2006 10:49 PM |
| New DVD database website | dvdloc8.com | DVD Video | 2 | 10-19-2004 06:59 AM |
| Philips DVDR75 picture quality problems | Tony Jeffreys | DVD Video | 1 | 10-18-2004 04:21 PM |
| Am I missing the point | BRS | DVD Video | 179 | 01-11-2004 07:31 PM |
| black&white picture on TV | Edi Rimanic | DVD Video | 0 | 01-05-2004 02:24 PM |