-1

Hello guys i start a statistics program with C#, and for that i want a value from a website, the value appear in inspect but not in html code , for that, how can i get all the inspect element code in string with C#, Anyone can help me ? and thanks a lot :D

1 Answers1

0

Create a WebClient instance, then use it to download the string to your website :)

Example: textBox1.Text = new WebClient().DownloadString(new Uri("http://www.google.co.uk"));

Sasha
  • 1,674
  • 1
  • 16
  • 23
  • That's the problem i do it but it give just the Html code :/ – Walid Rezzouqi Apr 05 '15 at 00:18
  • I don;t understand your question then, you want to make inspect element in a program? – Sasha Apr 05 '15 at 02:29
  • i want inspect element code not html code, for what do you tell me Webclient and downloadString get only HTML :( – Walid Rezzouqi Apr 05 '15 at 20:37
  • he wants the parsed javascript applied code. the html code you see (when you press ctrl u or f12) is DİFFERENT than when you do rightClick>inspectElement on a webpage in chrome. that is what he is trying to say. and he is right its different in %50 of webpages. this may be because of javascript appends some codes\tags\texts after html document is ready/loaded. – bh_earth0 Mar 01 '16 at 12:47
  • open it with c# webbrowser control. navigeto that file or url by webbrowser.navige(url) . from now on you have to get parsed html . but how ? that is i dont know too – bh_earth0 Mar 01 '16 at 12:49