Search code examples
c#httpwebrequesthttpwebresponse

Get Value from source code by HttpWebResponse C#


I'm use HttpWebResponse in c# for Response my Request And saves Response data(string) in StreamReader It's work ! But i need to Messages box for some text in StreamReader Look this aera :

<tr><td class='left' style='width: 120px'>Country</td><td class='left'><img src='images/flags/us.png' alt='United States flag' title='United States flag'> United States (US)</td></tr>

this is HTML code ! and i want get This from it

United States (US)

--note : every request the : 'images/flags/us.png' And 'United States flag' It's Change to Others !


Solution

  • Also , Html Agility Pack is the best work ! , I'm uses Regex really is work!