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.a spx?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 1089
Try : http://support.microsoft.com/kb/260519/en-us
--
<gr***@spray.se > a écrit dans le message de
news:11******** **************@ o13g2000cwo.goo glegroups.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.a spx?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.AddHea der("Content-Disposition", "inline;filenam e=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.goo glegroups.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.a spx?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.goo glegroups.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.a spx?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 this variable (in this case %filename%) with
whatever was passed.
This works fine when the page is called from the cgi script because it has
|
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 image name in the same fashion
using =onclick showimage(this). Is this possible at at
I have tried all combinations of
document.getElementbyId();
document.getElementbyName();
document.getElementbyTagName();
|
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 the db is located. I would like to
move them to their own folder and I don't know where to begin.
here is the code:
Private Sub Form_Activate()
'find the path of the current database
'which is where the jpegs are stored
|
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' parameter tells what picture from the
db to display.
|
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 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
| |
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, System.Drawing.Imaging.ImageFormat.Jpeg);
I'm using this to display images in the browser using an URL like this:
http://localhost/GetPhoto.aspx?Resolution=L1&PhotoId=50052095
|
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 retrieve the image from the session
object, convert it back to an image, and re-save it to the database?
Thanks?
|
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 connection As New OleDb.OleDbConnection()
Dim cmd As New OleDb.OleDbCommand()
cmd.CommandText = "select ID,Name,Description,Image from
MASTER where ID like '" & Trim(cmbID.Text) & "'"
cmd.Connection = connection
Dim myReader As OleDb.OleDbDataReader
|
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 line of the picture that contains most pixels. How can I do that ?
Many Thanx
|
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 is:
Me.bxPics.Image = ImgLst.Images.Item(i)
where i is a randomly generated number. Underneath the picture box is a text box where I would like the filename of the picture to be displayed. I don't understand how this is so hard to implement as in...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |