I am fetching Anchor Tag data from a URL using HTMLAGILITYPACK but with some kind of Comparison. I have some String type Variables with some value All I want is to Compare with Fetched Anchor Tag and Print it.
NOTE: There are three words in a String Variable I want to print those who matches its first value or any of them.
Here is My Code
foreach (var aTag in atags)
{
string val1 = "Something is there";
string val2 = "There is Nothing";
if (val1 == aTag.InnerHtml || val2 == aTag.InnerHtml)
{
OutputLabel.Text += counter + ". " + aTag.InnerHtml + "<br /><br />";
}
counter++;
}
I tried to Use Similary Posted Questions but that doesn't seems to work for me.