Click here to Skip to main content
Sign Up to vote bad
good
See more: C#
private void button1_Click(object sender, EventArgs e)
        {
            var client = new WebClient();
            string content = client.DownloadString("http://www.w3schools.com/");
            textBox1.Text = content;
        }
 
then saving the text of textbox1.text=content as html file.It's working and open as a web page, but problem is,if there are any images then not working,at the place of image there is small cross symbol.
 
So i want ur help, how can i download the images and other content also and link it to their place,to show it in proper format as webpage looks on net. (like we save any page and use it as a offline)
 
one thing i m not using website project, i m working through c# windows.
 
help
Posted 5 Nov '12 - 19:08
Edited 5 Nov '12 - 20:50


3 solutions

you can use http://www.httrack.com/page/2/[^]
download it. and you can download full website.
  Permalink  
Comments
aspnet_regiis -i - 6 Nov '12 - 1:49
What is 'wanna' ?
AdityaPratapSingh - 6 Nov '12 - 1:51
he want to say "i want learn 'How to download whole web page contents including images even from inside JavaScripts without using third party dll.' in c#"
01010RAJ - 6 Nov '12 - 2:06
right
  Permalink  
Comments
01010RAJ - 6 Nov '12 - 1:49
here logic is same as i m doing, and one thing,it's bye asp-net. plz yr give right answer only mention in my question heading (using c#)
public static void DownloadFile(string remoteFilename, string localFilename)
{
    WebClient client = new WebClient();
    client.DownloadFile(remoteFilename, localFilename);
}
  Permalink  
Comments
01010RAJ - 6 Nov '12 - 2:16
here remotefile=http://www.w3schools.org// and localfilename=application.startupath+myfile.html can i assign them like this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 345
1 Sergey Alexandrovich Kryukov 338
2 Arun Vasu 315
3 Maciej Los 208
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,755
1 OriginalGriff 7,549
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid