I have a string that contains html. Inside of this string there is an html tag and I want to retrieve the inner text of that. How can I do that in C#?
Here is the html tag whose inner text I want to retrieve:
<td width="100%" class="container">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the Html Agility Pack.
Edit something like this (not tested)
You can also select the text directly with a different XPath selector.
Related questions: