How do I open the webpage in webBrowser1?
I added new webBrowser component into new window, when I added the button
this is the code on this button:
private void button1_Click(object sender, EventArgs e)
{
string URL = @"http://www.site.com/search?=N";
this.webBrowser1.Url = new Uri(URL);
this.webBrowser1.Navigate("URL");
this.webBrowser1.Refresh();
}
But it does not work – no errors reported, but webBrowser1 does not show any data after the button is pressed.
Instead of:
try:
This way instead of navigating to the site
"URL"(which obviously doesn’t exist) you navigate to the site that the URL variable is pointing to (which ishttp://www.site.com/search?=N).