HtmlWindow.Navigate Method (Uri, String)

Silverlight

Opens the specified page in the specified browser instance.

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

public HtmlWindow Navigate(
	Uri navigateToUri,
	string target
)

Parameters

navigateToUri
Type: System.Uri
The URL of the page to open.
target
Type: System.String
The name of the window or tab that navigateToUri should be opened in.

Return Value

Type: System.Windows.Browser.HtmlWindow
A reference to the underlying window object that represents a new browser instance.

ExceptionCondition
ArgumentNullException

navigateToUri or target is null.

This method overload gives you the ability to open a new page in an existing browser instance other than the current browser. It is equivalent to the JavaScript open method with the target property set to the name of an existing browser.

The target parameter specifies the name of the browser instance that the navigateToUri address should be opened in:

  • If target specifies an existing browser, the URL is loaded into that browser.

  • If the target parameter is an empty string, the method functions like the Navigate(Uri) method overload, and the URL is loaded into the current browser.

NoteNote:

Your system and browser configuration settings control whether browser instances are displayed as windows, tabs, or multiple-document interface (MDI) child windows.

For more information, see the open method in the dynamic HTML (DHTML) documentation.

The following code example demonstrates how to use this method.


System.Windows.Browser.HtmlPage.Window.Navigate(
    new Uri("http://silverlight.net"), "_blank");


Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: