0

i am useing this code to read html pages :

 WebClient client = new WebClient();
            String htmlCode = client.DownloadString(@"C:\checkemails\check.html");
            // Replace all html breaks for line seperators.
            htmlCode = htmlCode.Replace("<br>", "\r\n");
            MessageBox.Show(htmlCode);

the html page is on C:\ but lets say i am loading yahoo.com.. or what ever page.

i need to find a div named who got the id of

<div id ="say">

how can i do so?

1 Answer 1

3

try using HTMLAgilityPack for this sort of thing...

for select item from a div see for example Select only items in a specific DIV using HtmlAgilityPack

Sign up to request clarification or add additional context in comments.

6 Comments

what using does i need for it?
it is a library - you can download it from codeplex, it comes with samples... just follow the first link in my answer.
stupid qustion. i have never used librays, where do i put it ?
Nver MIND! its works. the other thing you gave me isnt that good, any one have any other?
put it wherever you want - the only important thing is to be able to "add reference" the HamlAgilityPack.dll in your project (also set copy local to true) and then in your source you add using HtmlAgilityPack;
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.