473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Force file to dowload

Hi!

How can I force the file download, for example a .doc?
I don't want to open with IE.

Thanks.

Albano Alves
Nov 21 '05 #1
4 1165
Albano,

"Albano Alves" <al**********@vpconsulting.pt> schrieb:
How can I force the file download, for example a .doc?
I don't want to open with IE.


'WebClient.DownloadFile' (requires a reference to "System.Web.dll").

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Thanks for help.
Could you give a example?

Albano Alves

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> escreveu na mensagem
news:u4*************@TK2MSFTNGP15.phx.gbl...
Albano,

"Albano Alves" <al**********@vpconsulting.pt> schrieb:
How can I force the file download, for example a .doc?
I don't want to open with IE.


'WebClient.DownloadFile' (requires a reference to "System.Web.dll").

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Albano,

There is not much to give as example with this.
When the reference is set, than does this the Job

dim wb as new webclient
wb.downloadfile("Url","c"\myfile.jpg")

I hope this helps?

Cor
Nov 21 '05 #4
Albano,

"Albano Alves" <al**********@vpconsulting.pt> schrieb:
Could you give a example?


\\\
Imports System.Web
..
..
..
Dim WebClient1 As New WebClient()
WebClient1.DownloadFile("http://dotnet.mvps.org/", "C:\aa.txt")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5

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

Similar topics

7
by: steve | last post by:
Hi, I just upgraded my php but ran into a problem. Never seen this before. Somehow it seems I lost php file association. When I do a http://localhost/something.php I get a prompt for dowload...
2
by: Derrick | last post by:
Anyone been able to get a multi file HTTP download working with ASP? I have a single file download working fine with the usual setting the content type, file name, stream the file from...
4
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of...
3
by: AJ | last post by:
Hi , I am trying to dynamically change file name of an html that is generated through a cgi script, I know that for it is easy to do this for other type of files such as pdf or csv which we...
2
by: Mark | last post by:
Hi, In my web application I have to let users to download files from web server. How can track or find out that a file was downloaded so I can delete it from web server? I'm coping file to...
2
by: marcos | last post by:
sorry, but my english are very bad... how lto dowload visual basic 6.0 from internet?
6
by: rony_16 | last post by:
Hi, I have problem with downloading a file using WebRequest and HttpWebResponse. Inorder to download this file i need to call to url that tells to prepare the file for download, and then i call...
3
by: Kevin Audleman | last post by:
Yesterday my site unexpectedly stopped loading. I tracked it down to the CSS file for the site. When I commented it out, the site was okay. When I put it back in, it was not. I tried connecting to...
4
by: muddasirmunir | last post by:
i have a zip file when i open it it cotain some i think xls files . when i click to open the file it look like this pictured (just click to dowload the picture) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...

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.