Reputation: 649
This code block the website ex: http://google.com or plus.google.com but https://google.com doesn't work
e.Cancel = e.Url.Host.Contains("google");
Upvotes: 3
Views: 336
Reputation: 376
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
e.Cancel = e.Url.ToString().Contains("google");
}
Upvotes: 2