3
此代碼塊的網站例如:http://google.com或plus.google.com但https://google.com不起作用阻止網站在HTTPS
e.Cancel = e.Url.Host.Contains("google");
此代碼塊的網站例如:http://google.com或plus.google.com但https://google.com不起作用阻止網站在HTTPS
e.Cancel = e.Url.Host.Contains("google");
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
e.Cancel = e.Url.ToString().Contains("google");
}
閱讀http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowsernavigatingeventargs.url.aspx – user1655481
沒有......閱讀請HTTPS – Federal09
我們需要比這更多的代碼。這個叫什麼事件處理程序? –
private void webBrowser1_Navigating(object sender,WebBrowserNavigatingEventArgs e) e.Cancel = e.Url.Host.Contains(「google」); } – Federal09