Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello,

I would like to create an application that could read an html file. Then I would like to search desired strings and get the data to text edit elements using C#. Could you please help with any example or tutorial? Thank you!

Regards

What I have tried:

WebClient client = new WebClient();
String htmlCode = client.DownloadString("D:/Work 2017/Site.html");
Posted
Updated 12-Jun-18 2:52am
Comments
jaket-cp 12-Jun-18 8:50am    
sounds like web scraping is what you want
http://lmgtfy.com/?q=web+scraping+c%23
https://www.codeproject.com/Articles/1041115/Webscraping-with-Csharp
F-ES Sitecore 12-Jun-18 9:44am    
google for the htmlagilitypack

1 solution

There is some discussion of various methods to parse HTML documents here to get you started:

String to HTML Document[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900