473,564 Members | 2,730 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set default save filename?

I have an .aspx file with the following code in Form_Load:

image = System.Drawing. Image.FromFile( imageFilename);
Response.Conten tType = "image/jpeg";
image.Save(Resp onse.OutputStre am, System.Drawing. Imaging.ImageFo rmat.Jpeg);

I'm using this to display images in the browser using an URL like this:

http://localhost/GetPhoto.aspx?Resol...otoId=50052095

The problem is that when I use "Save Picture As..." from the browser, the
default filename in the Save As... dialog is "GetPhoto.aspx" . This is quite
meaningless for a picture.

I would like the default filename to be "50052095.j pg".

Is this possible?

Olav
Nov 18 '05 #1
0 1243

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2974
by: Kit Truong | last post by:
Hello, I have an asp page that produces output from a database. This allows a simple way for the user to save the data to a text file by going to File->Save as... The default save as options always defaults to a particular filename and the save as type is always html, therefore the user has to manually type a filename and choose Text...
3
1671
by: nbaxley | last post by:
I'm using a binary stream to send down a file with ASP from the web server. I've been having trouble with IE and getting it to recognize my file. I've added the filename as a paramater(?filename=file.jpgw) to handle IE's mime type mangling, but I'm still having trouble with IE's default Save As Type being HTML. When we send down a jpgw...
1
2602
by: Wayne | last post by:
I'm using the following code from the Access Web to open a folder. The folder opens in "List" View. Is there an addition that I can make to the code to force the folder to open in "Details" view? 'This code was originally written by Ken Getz. 'It is not to be altered or distributed, 'except as part of an application. 'You are free to use...
10
4332
by: GJP | last post by:
Hello. Ive been asked to make my own notepade for college assignment. All ig going well, but i cant get the save to work. I can get Save a (shows dialog box), i can get it to just save too, but when i try to put an IF in it to check if the file has already been saved before, it will not save.
2
2328
by: tedqn | last post by:
I use the Stream method to serve certain file types to the user. If the type is pdf, it opens in the browser fine. My problem is with those that the browser doesn't have plug-ins such as ppt, word, etc. it prompts to choose Open/Save/Cancel and defaults the filename to the ASP page serving the content. ie. BinarySend.asp -> BinarySend.doc,...
2
3551
by: Leo | last post by:
I am using OPENFILENAME and GetSaveFileName to let user save a document out. However, the default name won't show up in the dialog and the selected filter can't be obtained (always got the default one) after the dialog is dismissed. Any hint is highly appreciated! Leo OPENFILENAME ofn; TCHAR defDir; TCHAR filePath;
13
13193
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel" HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=ABC.xls") HttpContext.Current.Response.Write(strHTML) HttpContext.Current.Response.End() However when the user tries to...
1
3440
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but with this code it is often 4000-5000 kb.s. What am I missing? public class EmrTiff : IDisposable { private string fileName; private ArrayList...
2
10976
by: vbaDev | last post by:
Hi. I am using Access 2000 and in my code I'm exporting a table into an Excel file (creating it), then the code needs to export another query into the same file (a new worksheet). So I needed both a "Save As" dialog and the ability to grab the filepath so that the second export appends to it. Anyway, I found Microsofts method and it works,...
0
8108
jinu1996
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...
1
7644
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...
0
7951
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
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...
1
5484
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.