Tag: browser history

如何在C#中使用WebBrowser控件清除浏览历史记录

我希望在WebBrowser完成浏览后清除C#中WebBrowser控件的浏览历史记录。 这是我的代码: try { foreach (string sr in File.ReadAllLines(“link.txt”)) { webBrowser1.Navigate(sr); webBrowser1.ScriptErrorsSuppressed = true; } while (webBrowser1.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); } } catch(Exception) { MessageBox.Show(“Internet Connection not found”,”Error”,MessageBoxButtons.OK,MessageBoxIcon.Error); this.Close(); }