0

I need to get a certain piece of text from a webpage and display it in a label, i have searched and haven't found anything i understand very well, im pretty sure i will have to use getelementbyid but i'm not sure

  • i only want a certain piece of text from the webpage though ? – Sam Rogers Dec 04 '14 at 00:36
  • 3
    Your question is quite vague and if you provide more detail someone would be able to give you assistance. Are you creating a Windows form app, ASP.net app etc? Is the text you're grabbing from the same page you want to display it on? – earthling Dec 04 '14 at 00:36
  • im creating a windows form and i just want to get the text from a webpage and display it as a label on the form – Sam Rogers Dec 04 '14 at 15:53

1 Answers1

0

Check out HttpClient.GetStringAsync. You'll need to pull down the contents of the page at the given URL and then parse the contents for the field you want.

After that, displaying the value in the label is pretty straight forward. Give it a shot and if you run into problems post a specific question with code and you'll get a lot of help.

Community
  • 1
  • 1
earthling
  • 5,084
  • 9
  • 46
  • 90