Well, I\'m using a simple webbrowser control to browse to a page, so I need to change the Text of the form while doing so. I\'m using -
private void webBrow
if (browser.ReadyState != WebBrowserReadyState.Complete)
is recommended.
And when there are frames in the page,DocumentCompleted will be fired several times.And this is difficult to solve.Some ways like checking the urls are not accurate.
BTW, why not using this:
this.Text = stringA + " - " + webBrowser1.Document.Domain;
Try to using a fixed prefix,problem may be solved easily.
It gets fired once per frame.
I have the same problem, and the reason was because, by default when you add the control it generate designer code like this.
this.webBrowser1.Url = new System.Uri("", System.UriKind.Relative);
and if you change the url after calling
InitializeComponent();
WebBrowser.Navigate("NewUrl.com");
It will load two different pages: About:Blank and NewUrl.com
Just, remove the designer code... and you'll stop the "double" event.