473,657 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

button to download a file

There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?

I note there's a download behaviour for IE (which doesn't seem to work
in IE 6) but I was hoping for a cross browser solution.

Andrew Poulos
Mar 5 '07 #1
2 4448
ASM
Andrew Poulos a écrit :
There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?
put files in *.zip
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 5 '07 #2
On Mar 5, 4:55 am, Andrew Poulos <ap_p...@hotmai l.comwrote:
There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?
just for an fyi:

browsers will popup the "save as" dialog depending on what the mime
type of the file is you are linking to. so for instance if you have a
pdf file, your browser sees the mime type as "applicatio n/pdf" and
will attemp to open it in the browser. if you have a .zip file, your
browser will see the mime type "applicatio n/zip" and recognize that it
should NOT try to open this file in the browser and you will get the
"save as" dialog popup.

Different mime types will either open the "save as" dialog or just try
to open the browser, and maybe some other action i'm missing. I'm not
sure if there are settings in the browser to change those behaviors or
not.

Mar 5 '07 #3

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

Similar topics

6
1634
by: js | last post by:
Hi, how to do this: the page is to be able to allow a user to enter a password so as to download documents. It does not meant for any users to download. It is for some specific users. What I want is to send them a password through email, but I want to know who's has downloaded. Please adivce. thanks...
0
1669
by: Ilia Makarenko | last post by:
Hi everyone! I've got a problem with IIS 6.0 when downloading files with size > 4 Mb. So I am trying to download file in chunks, but it doesn't work. Only pert of the file is downloaded (~6.5 of 22.5 Mb). Here is the code: .... ext = right(filename, 3)
4
1858
by: mphanke | last post by:
Hi, how can I connect to a restricted directory on a server and download a file, if there is a newer version, than the one on the local file system? Something like http://user:pass@www.myserver.com/restricted/directory/thefile.file Thanks,
1
2193
by: user2008 | last post by:
Hi all, I want to track how many times visitor download file from my website, for example, when visitor click on a download link, a ASPX page will be requested, after that it will redirect to a file stored on my web site, final visitor will see open/save file dialog, how to do that, or is there an example code do this work? thank you,
0
2028
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
16
3244
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will not print in the username or email amddress of the person doing the download - which I am collecting from a form on the previous page. I can get the name and email address to print out normally, just not into the email sending body. I have...
8
2988
by: BiT | last post by:
Hello, I'm working right now on project in vb.net 2005 for my company, i need the project to download file from the company web site. In order to get the file i have to give the site address http://www.somthing.com and then send to the server post data like "&d=10202" to get the file. i've search google and newsgroups but I didn't find anything to solve my problem, I found this example...
3
2711
by: cypherkro | last post by:
Hi I have a requirement to automatically download a file using a WebBrowser control without having the "Download File" pop up windows display. I cannot use Webclient!! I am using VS2005, .net2 and the application is a windows application. Does anyone have a solution to automatically downloading the file from a WebBrowser control. Thanks in Advance
5
2246
by: vinodkus | last post by:
dear sir/madam I have to write a code for download file using asp. please help me thanks in advance
1
2776
by: vikassawant | last post by:
Hi, I m facing some critical problem for downloading 5mb file from server. Does anyone know? How to reduce the time to download file from server using HTTP connection?
0
8823
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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,...
0
8603
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
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...

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.