System.Windows.Forms.WebBrowser.Navigate Method

Loads the document at the specified Uniform Resource Locator (URL) into a new browser window or into the System.Windows.Forms.WebBrowser control.

Syntax

public void Navigate (string urlString, bool newWindow)

Parameters

urlString
The URL of the document to load.
newWindow
true to load the document into a new browser window; false to load the document into the System.Windows.Forms.WebBrowser control.

Remarks

The System.Windows.Forms.WebBrowser control maintains a history list of all the Web pages visited during a browsing session. When you call this overload with a newWindow parameter value of false, the control navigates to the specified URI normally and adds the URI to the end of the history list. When you call this overload with a newWindow parameter value of true, the System.Windows.Forms.WebBrowser control loads the document at the specified URI into a new Internet Explorer window, which maintains its own navigation history. You can handle the WebBrowser.NewWindow event to receive notification before a new browser window is opened, allowing you to cancel the action if necessary.

The System.Windows.Forms.WebBrowser control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page or loads a page into a separate browser window, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the WebBrowser.Refresh method to force the System.Windows.Forms.WebBrowser control to reload the current page by downloading it, ensuring that the control displays the latest version. When a page is loaded into a separate Internet Explorer window, the user can retrieve the latest version by clicking the Refresh button.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0