EDN Admin
Well-known member
Hi Guys,Ok I am using html agility pack.I am using the link below as the webpage reference. I was to return the total number of search matches (in this case 31) into my project.
http://www.brokerforum.com/electronic-components-search-en.jsa?originalFullPartNumber=45678&x=77&y=9&hasNoSearchCriteria=false
The html that I need to drill down to is as follows...
<pre class="prettyprint <div class="resultsDescription
Results <span>1-25 for 45678 (of <span>31)
[/code]
My code so far is as follows.....
<pre class="prettyprint HtmlWeb hw = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = hw.Load("http://www.brokerforum.com/electronic-components-search-en.jsa?originalFullPartNumber=45678&x=77&y=9&hasNoSearchCriteria=false");
HtmlNode linkNodes = doc.DocumentNode.SelectSingleNode("//div[@class="resultsDescription"]/span");
txtDeleteAfter.Text = linkNodes.ToString();[/code]
Many Thanks,
Dean
<br/>
View the full article
http://www.brokerforum.com/electronic-components-search-en.jsa?originalFullPartNumber=45678&x=77&y=9&hasNoSearchCriteria=false
The html that I need to drill down to is as follows...
<pre class="prettyprint <div class="resultsDescription
Results <span>1-25 for 45678 (of <span>31)
[/code]
My code so far is as follows.....
<pre class="prettyprint HtmlWeb hw = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = hw.Load("http://www.brokerforum.com/electronic-components-search-en.jsa?originalFullPartNumber=45678&x=77&y=9&hasNoSearchCriteria=false");
HtmlNode linkNodes = doc.DocumentNode.SelectSingleNode("//div[@class="resultsDescription"]/span");
txtDeleteAfter.Text = linkNodes.ToString();[/code]
Many Thanks,
Dean
<br/>
View the full article