I asked the same question!
Here is the Navigate(string URL) function:
private void Navigate(String address)
{
if (String.IsNullOrEmpty(address)) return;
if (address.Equals("about:blank")) return;
if (!address.StartsWith("http://") &&
!address.StartsWith("https://"))
{
address = "http://" + address;
}
try
{
webBrowser1.Navigate(new Uri(address));
}
catch (System.UriFormatException)
{
return;
}
}
Then do:
String URL = "";
textBox1_Click(object sender, EventArgs e)
{
URL = textBox1.Text;
}
buttonGo_Click(object sender, EventArgs e)
{
Navigate(URL);
}
You can add better disign and more!
I'd like I was helpful!
:)