Why my System.Diagnostics.Process.Start cannot work?

时间:2015-10-06 09:01:05

标签: c# debugging visual-studio-2013

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");

        }

1 个答案:

答案 0 :(得分:0)

你应该使用像

这样的代码
this.webBrowser1.Navigate("http://google.com");

DocumentCompleted事件中导航到另一个人也很奇怪。以按钮单击处理程序为例实现它。