C# Tutorial 92: How to Download a File from Internet using C#

  Рет қаралды 87,843

ProgrammingKnowledge

ProgrammingKnowledge

Күн бұрын

Пікірлер: 61
@ProgrammingKnowledge
@ProgrammingKnowledge 11 жыл бұрын
@relaxyourmind6181
@relaxyourmind6181 11 жыл бұрын
Hello Sir, I was able to become really Good in both C# and Java thanks to your series! Sharing your knowledge is one of the best thing in the world. I have a question for you. * How to Generate a Report using C# ? Thanks you very much for the knowledge and best regards.
@ragnarloth6531
@ragnarloth6531 6 жыл бұрын
nice tutorial! p/s: for others, you may want to unsubscribe the event after you prompt out msgbox download completed. otherwise the msgbox will pop out twice after you click download button for the second time
@johnnguyen1655
@johnnguyen1655 4 жыл бұрын
Hi Ragnar, could you please share some code to unsubscribe the event?
@glebi.r6
@glebi.r6 2 жыл бұрын
Its very simpile private void FileDownloadComplete2(object sender, AsyncCompletedEventArgs e) { MessageBox.Show("Download Completed"); wc.DownloadFileCompleted -= new AsyncCompletedEventHandler(FileDownloadComplete); } If you want to unsubscrib an event just replace the "+" with "-" 👍
@microhuedevelopment810
@microhuedevelopment810 6 жыл бұрын
Thank you, this is perfect for my app store app.
@genuinefraud8262
@genuinefraud8262 4 жыл бұрын
Thanks for talking english! the tutorial helped me out a lot even tho its very old.
@omairzamir1246
@omairzamir1246 9 жыл бұрын
Gud Work...!
@jansterenborg
@jansterenborg 9 жыл бұрын
Good example of uploading a file to a program
@GodFatherGamingyt
@GodFatherGamingyt 7 жыл бұрын
WOW bro your connection is off bt also it Downloaded files thats amazing
@ZombieBears20
@ZombieBears20 6 жыл бұрын
LOCALHOST WEB SERVER.
@kusumikadey2873
@kusumikadey2873 3 жыл бұрын
How to download a file from a server having particular IP?? Please do reply. It will be helpful.
@rouziLove
@rouziLove 7 жыл бұрын
I have a question. When I am downloading URL how I can choose in which folder to sva the file? Thank you
@sultan-ns1kj
@sultan-ns1kj 4 жыл бұрын
thank you so much
@forex8899
@forex8899 4 жыл бұрын
Thanks
@zerogrim4786
@zerogrim4786 9 жыл бұрын
wow i like your video but sir how can i set the download location of the file that i wanna download? :o
@kifkifa56
@kifkifa56 7 жыл бұрын
Solved! Many have commented that file downloaded with zero bytes so I tried this on console application and solved this problem by just putting Console.Read(); after wc.DownloadFileAsync() method .... This is because without console.read(); the program exits before the file downloaded completely.
@kwasim11
@kwasim11 7 жыл бұрын
Can you please send me your console app code... Thanks!
@AnimeniacSimey
@AnimeniacSimey 4 жыл бұрын
Thanks so much! But how do you download file to a certain path? Thanks!
@programmerfromhershey4205
@programmerfromhershey4205 8 жыл бұрын
can you also download from sites that uses surveys?
@Luc_Skywalker
@Luc_Skywalker 7 жыл бұрын
this is fine when you know the file your going to download. If you were to download a file from WebBrowser to save on your computer, unknown file extension, now, how to catch that would be helpful!
@johnnguyen1655
@johnnguyen1655 4 жыл бұрын
Hi Lucas, did you have solution for catch the file extension?
@ahmedariftek4635
@ahmedariftek4635 11 жыл бұрын
I have a question for you. how to user authorization in c# Thanks you very much for the knowledge and best regards. ·
@JunaidKhan-ht5jy
@JunaidKhan-ht5jy 7 жыл бұрын
Is this just for images or any kind of file like mp3 or any other ???
@Spiceysec
@Spiceysec 3 жыл бұрын
with 'Uri fileurl = new Uri();' what do i put in for just a link to a file not a text box input to the link?
@Eloiby
@Eloiby 6 жыл бұрын
Excellent! can you do it more like JDownloader? New tutorial please! button to cancel download and stop download
@aeriuzgaming8737
@aeriuzgaming8737 7 жыл бұрын
hello sir, do u have a tutorial for liking, scrolling, posting on facebook with voice command using c#?
@jehartbonilla3712
@jehartbonilla3712 11 жыл бұрын
Hello Sir May i ask you about what books did you read to accomplish this knowledge thank you..
@thalesfeitosa
@thalesfeitosa 5 жыл бұрын
Your videos is awsome, but tell me, what i have to do, for the file don't overwrite the other file that i downloaded?
@theviniconceicao
@theviniconceicao 9 жыл бұрын
I'm Brazilian and I love your videos! You could bring a video of how to make a "Torrent Downloader"?
@Flavio010295
@Flavio010295 9 жыл бұрын
Pandoso Player or downloaf mp3 from youtube!! Hey guy i'm Brazilian too!
@theviniconceicao
@theviniconceicao 9 жыл бұрын
legal kr
@mr.tuttifrutti9280
@mr.tuttifrutti9280 7 жыл бұрын
Hi, i am from Russia. Nice to meet you)
@gameramante
@gameramante 7 жыл бұрын
I'm also Brazilian :)
@sergiode2015
@sergiode2015 6 жыл бұрын
Sou brasileiro também BR
@jordangreenberg7990
@jordangreenberg7990 8 жыл бұрын
Can I create my own executable file, kind of like Google earth or a pc game, using your method? Please let me know about that. Also, can I get the downloaded .txt file from a survey as well with this method? Because the surveys never unlock for me that much. I have to get visual studio for this. Is that right? Please let me know. So thanks so much.
@YasaaGaming
@YasaaGaming 6 жыл бұрын
This works good And File image file downloaded. But I try to open downloaded image Its not open.It show me error ( It appears that we don't support this file format. ) Help me to fix this problem..
@mmas.3315
@mmas.3315 8 жыл бұрын
I dont have asynccompleted Event arg. it doesnt show up? whats the problem
@reindeboer7374
@reindeboer7374 5 жыл бұрын
Just put Console.Read(); after wc.DownloadFileAsync() to fix the unreadable file problems. It won't quit before completion!
@mattlambert3118
@mattlambert3118 9 жыл бұрын
Are you sure this works for pdfs? This seems to work well for image files, but I can't get it to download anything else. Am I missing something? The videos are great, by the way.
@mattlambert3118
@mattlambert3118 9 жыл бұрын
Matt Lambert I figured it out and wanted to share incase others run across the same problem. This is just my understanding, so anybody feel free to correct me if I'm wrong or there is a way to get around this.///////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////// *dashes aren't part of the code I'm just using them to clarify what's code and apperantly youtube isn't letting you use line breaks anymore, So I'm going to separate paragraphs with backslashes. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Some links to pdf files are really links to pages that then redirect you to the pdf. The source code for the page linking you to a pdf file may follow the link url with an http statement that says, ------- rel="nofollow" ---------. That's apparently put there to tell google web spiders not to follow the link. If your program follows the link anyway, the page it goes to is going to ask it for some info that it needs to redirect you again to the actual pdf page. If your program doesn't give the page the info if asks for, you're stuck on that page trying to download something that isn't there. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Long story short, if the link to the pdf is followed up by ------- rel="nofollow" --------- in the source code, you're probably not going to your pdf's url and you're going to need to figure out a way to give the next page what it needs so you can then get the url it's going to redirect you do. I don't know how to do that, but if anyone else does or I'm completely wrong I encourage you to correct me. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Hope this helps somebody.
@xicolopez9173
@xicolopez9173 8 жыл бұрын
hello, i need to download json from google drive but when i try to download of this metod i cant because i need open the session first, can you help me?
@fatimasiddiqui388
@fatimasiddiqui388 3 жыл бұрын
damage pdf document after downloading, document gives an error in opening file
@fahim6191
@fahim6191 9 жыл бұрын
i works perfectly, Thank you. But when i come to download video's its not working. please fix it in order to accept the request of a subscriber. Thank you, hope you will pay attention towards my request.
@vexxy9879
@vexxy9879 4 жыл бұрын
downloading a video is something else than a file, you would need to select the format (mp3/mp4 etc) and then the download
@ImtiyazAmeerodien
@ImtiyazAmeerodien 9 жыл бұрын
Hi. This video is extremely helpful in the task I wish to achieve. I notice the file is downloaded from an location. Can you kindly advise me how would I download a file from an https location?
@anhdev3656
@anhdev3656 8 жыл бұрын
hello, how to download folder ?? please
@programmerfromhershey4205
@programmerfromhershey4205 8 жыл бұрын
doesn't work, i try to download a .js file, i think hey it works, and i open the file and there Is no DATA in it PLZ HELP ME!!
@GamersFanatics2
@GamersFanatics2 7 жыл бұрын
Same with any type of file, i download and the file isnt complete
@reindeboer7374
@reindeboer7374 5 жыл бұрын
Just put Console.Read(); after wc.DownloadFileAsync() to fix this problem. It won't quit before completion!
@romzamir
@romzamir 5 жыл бұрын
One and a half minutes of the video is just making a message box saying download complete...
@kiromorgan
@kiromorgan 6 жыл бұрын
I want to copy the code please send it to me
@SriSuniFamily143
@SriSuniFamily143 10 жыл бұрын
video files are not downloading
@mustaqeezahmad5591
@mustaqeezahmad5591 7 жыл бұрын
i think you can't replay to any comment
C# Tutorial 91: How to get Source Code from a Website with C#
8:58
ProgrammingKnowledge
Рет қаралды 42 М.
C# Tutorial 88: How to Search Listbox and get all matches using C#
17:10
ProgrammingKnowledge
Рет қаралды 69 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 48 МЛН
Haunted House 😰😨 LeoNata family #shorts
00:37
LeoNata Family
Рет қаралды 6 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 34 МЛН
MySQL 21: SQL triggers || triggers on delete.
7:57
Thequickblog
Рет қаралды 38
Bitcoin Soars, Hedge Funds Lose Billions on Tesla | Bloomberg Technology
44:21
Bloomberg Technology
Рет қаралды 14 М.
How to Install Java on MacBook Air M1/M2/M3 Latest Chip | Install Java JDK on macOS
15:40
Learn Automation Testing from scratch
Рет қаралды 2,8 М.
How to Annotate PDFs on iPad | Paperless
3:36
PDFgear
Рет қаралды 30
How to Install JMeter on Windows 11 (2024)
13:53
ProgrammingKnowledge
Рет қаралды 6 М.
How to create an Released APK Bundle file in Android Studio
3:22
Decoding The Coding Interview
Рет қаралды 38