-2

I tried to run my webpage and the Console.WriteLine did not work.

Does anyone know why?

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
                System.Diagnostics.Process.Start("https://www.google.com.sg/");
                Console.WriteLine("Running");
                System.Diagnostics.Trace.WriteLine("run");

        }
HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
Zynnette
  • 3
  • 4

1 Answers1

0

You should use code like

this.webBrowser1.Navigate("http://google.com");

Also it's weird to navigate to another in DocumentCompleted event. Implement it in button click handler as example.

qxg
  • 6,955
  • 1
  • 28
  • 36