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");
}
答案 0 :(得分:0)
你应该使用像
这样的代码this.webBrowser1.Navigate("http://google.com");
在DocumentCompleted
事件中导航到另一个人也很奇怪。以按钮单击处理程序为例实现它。