Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I have a DataTable where the first Column contains the link for another page(that is done by JavaScript). I need to call these link one by one and get the data from the page. But I am unable to load it into webbrowser one by one.Only the last page is being load. Is there any alternative or JavaScript Loadcomplete method which can help me around this?

C#
foreach (DataRow DR in Dt.Rows)
{
 Doc = new HtmlAgilityPack.HtmlDocument();
 object[] args = { DR["Script"].ToString() };
 WbBrowser.Document.InvokeScript("ShowPR", args) ;

 Doc.Load(WbBrowser.DocumentStream);
HtmlNode PO = Doc.DocumentNode.SelectSingleNode("Some Xpath");
}
Posted
Updated 14-Jun-15 23:14pm
v2
Comments
Thanks7872 15-Jun-15 5:15am    
What do you mean by 'call these link one by one'?
aksjustcool 13-Jul-15 8:38am    
Suppose I have such 3 Script Number:
1001
1002
1003

On invoking each of them (One by one using foreach loop)we will land up on three respective different pages, but only the last page i.e. for script 1003 is seen.

I am unable to load the other two pages on webbrowser. Only the last page is being loaded. Is there any alternative or JavaScript Loadcomplete method which can help me around this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900