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, 4 1086
Try : http://support.microsoft.com/kb/260519/en-us
--
<gr***@spray.se> a écrit dans le message de
news:11**********************@o13g2000cwo.googlegr 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,
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
<gr***@spray.se> wrote in message
news:11**********************@o13g2000cwo.googlegr 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,
Hi,
Are you especifynng the correct content type?
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<gr***@spray.se> wrote in message
news:11**********************@o13g2000cwo.googlegr 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, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael |
last post by:
All,
I'll asked a question but I was not detailed (clear) enough for people to
help so I'll retry.
I have a cgi script pass a variable from one page to the next. The
'receiving' page replaces...
|
by: Sharad Gupta |
last post by:
i have this problem of capturing the filename on the instance when
onclick is activated in the <body>
the function should catch the filename and display it.
Second problem, i have to catch the...
|
by: Lumpierbritches |
last post by:
I'm trying to move my images from my main folder to an image folder for the
database to store pictures of animals. I borrowed code that works great if I
put all the images in the main folder where...
|
by: grz01 |
last post by:
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'...
|
by: DAC |
last post by:
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...
| |
by: Olav Tollefsen |
last post by:
I have an .aspx file with the following code in Form_Load:
image = System.Drawing.Image.FromFile(imageFilename);
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream,...
|
by: charliewest |
last post by:
Hello -
I have images saved in my SQL SERVER 2000 database. Using ASP.NET (C#) is
there any way to temporarily save an image to a session object, and after
running some other operations, later...
|
by: Abhishek |
last post by:
can anybody tell how to fetch image from database(access) to the
visual basic picture box control. the code i have been using is as
below but it gives me invalid paramter error....
Dim...
|
by: Anoosha |
last post by:
Dear Programmers I need your help,
I have a PictureBox there I load A picture retrieved from Database.
This so far good, but Now I want to scan the picture line by line horizontaly, to find which...
|
by: MattGaff |
last post by:
I have made an imagelist and populated it with a few images where the filename of each of the files is important.
I can generate the random images in a PictureBox when I click a button. The code...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |