This will provide a "loop" to wait until a new page is fully loaded. If I'm not mistaken, the browser control sends document complete messages for a number of things (image loads, etc), but the last one it sends its when the all objects are finished (including frames).
Not sure how this will behave with paging, but if they have different absolute addresses it should be fine.
private void Browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (!e.Url.AbsoluteUri.Equals(browser.Document.Url.AbsoluteUri))
{
return;
}
}
Note: I cant remember where I got this snip, but credit is not mine