Navigate Method (String, String)

WebBrowser.Navigate Method (String, String)


Loads the document at the specified Uniform Resource Locator (URL) into the WebBrowser control, replacing the contents of the Web page frame with the specified name.

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

public void Navigate(
	string urlString,
	string targetFrameName


Type: System.String

The URL of the document to load.

Type: System.String

The name of the frame in which to load the document.

Exception Condition

This WebBrowser instance is no longer valid.


A reference to an implementation of the IWebBrowser2 interface could not be retrieved from the underlying ActiveX WebBrowser control.

The WebBrowser control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the WebBrowser control loads the document at the specified URI into the Web page frame with the specified name, and adds the URI to the end of the history list. If the frame name specified is invalid, the document is loaded into a new Internet Explorer window.

Use the GoBack method to return the control to a previous page in the navigation history. Use the GoForward method to return to a later page in the navigation history after navigating backward.

The 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, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the Refresh method to force the WebBrowser control to reload the current page by downloading it, ensuring that the control displays the latest version.


for immediate callers to use this control. Demand value: LinkDemand; NIB: Named Permission Sets: FullTrust.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft