mardi 21 avril 2015

In C#, WebBrowser1,DocumentComplete fires 4 times

I have a button that has the following code

 webbrowser1.Navigate(testURL);

In my

 private void webbrowser1_Browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) {
       if (e.Url.Equals(psyncBrowser.Url))
        {
            Console.WriteLine("Now it is really done");
            MessageBox.Show("Loaded " + psyncBrowser.Url);
            webbrowser1.Stop();
        }
 }

I get a console message with the message 4 times!!! HOw can I stop this from happening?

Aucun commentaire:

Enregistrer un commentaire