此代码会阻止该网站:http://google.com或plus.google.com,但https://google.com不起作用
e.Cancel = e.Url.Host.Contains("google");
答案 0 :(得分:2)
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
e.Cancel = e.Url.ToString().Contains("google");
}