download a website for offline browser

Posted by Surajnair under C# on 1/20/2011 | Points: 10 | Views : 3516 | Status : [Member] | Replies : 11
hi..
i want to create an offline browser.so let me know how to download all links of a website so that it can be browsed offline.




Responses

Posted by: Karthikanbarasan on: 1/20/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Can you brief ur requirement?

Thanks
Karthik
www.f5Debug.net

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Surajnair on: 1/21/2011 [Member] Starter | Points: 25

Up
0
Down
hi....
actually me creating an offline browser.when we browse a website thru my browser then d site appears.So now i need to download that whole website and store it in the hard disk for using it in an offline mode.Whenever i click the download button of my browser,the visited site should be downloaded and stored along with its other links.How to download the browsed website and store it in our memory space.
pls help....

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/21/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Try this code

Use the WebClient class from System.Net; on .NET 2.0 and higher.

WebClient Client = new WebClient (); 

Client.DownloadFile("http://mysite.com/myfile.txt", " C:\myfile.txt");


Thanks
Karthik
www.f5Debug.net

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/21/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Check this link as well... U can get the html page as string and save it wer ever erquired

http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Download-HTML-Web-Page.html

Thanks
Karthik
www.f5Debug.net

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ck.kislay on: 1/21/2011 [Member] Starter | Points: 25

Up
0
Down
There are some third party tool available to download the whole website on your local machine for offline browsing But before downloading must go through the Terms and Conditons.

One of the site for this is www.surfoffline.com/download-website/

You can search on google may be able to find any free tool like that.

Thanks,
Chandan

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Surajnair on: 1/24/2011 [Member] Starter | Points: 25

Up
0
Down
hii...
cn u plz xplain this code to me.actually the downloaded page should b seen in my browser.

WebClient Client = new WebClient ();
Client.DownloadFile("http://mysite.com/myfile.txt", " C:\myfile.txt");

Me not able to get xactly what is to be done wid this.

Thnks,
Suraj

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Surajnair on: 1/25/2011 [Member] Starter | Points: 25

Up
0
Down
hi..
can u plz let me knw if v can use socket concept and thread in this like it is done in java.

thnks,
Suraj

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/26/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi Suraj,

Webclient will be a very good option... But you can use the thread concept as well to download the contents offline.

Thanks
Karthik
www.f5Debug.net

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Surajnair on: 1/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Can u please xplain to me the main logic dat is present behind the downloading of the web page into our system.Plz give me the gist about the operation or the process that takes place during the download.




Thnks
Suraj

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/27/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Suraj, you asking abt the webclient or the other one?

Thanks
Karthik
www.f5Debug.net

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Surajnair on: 1/27/2011 [Member] Starter | Points: 25

Up
0
Down
Me asking about the web client that you suggested.I wud be very greateful to you if you can xplain to me the logic about how this downloading takes place.




Thanks,
Suraj

Surajnair, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response