我试图运行我的网页,Console.WriteLine
但无法正常工作。
有人知道为什么吗?
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");
}
您应该使用类似的代码
this.webBrowser1.Navigate("http://google.com");
而且在DocumentCompleted
事件中导航到另一个很奇怪。以在按钮单击处理程序中实现为例。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句