I've tried to check other answers on this site, but none of them worked for me. I have following HTML code:
<h3 class="x-large lheight20 margintop5">
<a href="http://someUrl.com" class="marginright5 link linkWithHash detailsLink"><strong>some textstring</strong></a>
</h3>
I am trying to get # from this document with following code:
string adUrl = Doc.DocumentNode.SelectSingleNode("//*[@id=\"offers_table\"]/tbody/tr["+i+ "]/td/table/tbody/tr[1]/td[2]/div/h3/a/@href").InnerText;
I've also tried to do that without @href
. Also tried with a[contains(@href, 'searchString')]
. But all of these lines gave me just the name of the link - some textstring