OnDocumentCompleted went through 6 cycles?
I made a fun little program that searches through threads, but it went through the function six times, I isolated the problem and I found out that it was this.
Code:
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
Is there another way to get around this?
For more explanation:
If i put the above code and then I type
Code:
textbox1.append("hello");
when it's done, it will have at least six "Hello" 's in it.
Re: OnDocumentCompleted went through 6 cycles?
Debug how many time you attach the handler..
I'm sure you attach it more than once
Re: OnDocumentCompleted went through 6 cycles?
No, i don't think so, I just double clicked the webbrowser, and it generated the code, nothing else.
I think I'll just trying my code when it's done navigating.
On sites like google, it's fine, but on sites with asp and it loads multiple pages, it fires the block "document loaded" for each page loaded and not when the whole document is complete.