Navigate Method  
 

Description of the method.

Syntax

object.Navigate( Url )

Parameters

Url
A string which specifies the URL or local file to navigate to. Any leading and trailing whitespace will be removed and the URL will be normalized to ensure that it specifies a valid location. If the URL only specifies a domain name (such as "example.com") the browser will default to using a secure connection.

Return Value

Returns True if the method succeeds or False if the method fails.

Remarks

The Navigate method accepts both standard web URLs such as https://www.example.com/ and local file paths which are automatically normalized and converted into file:// URLs. This allows an application to load either remote web content or content from the local filesystem.

When a local file path is specified, the method validates the path to ensure that it refers to a valid, absolute file system location and is not under restricted system folders (such as the Windows or Program Files directories). Relative paths are resolved against the current working directory, but it is recommended that applications provide absolute paths to avoid ambiguity in multithreaded or service-hosted environments.

File names and paths are normalized before navigation. Illegal or reserved device names (such as CON, AUX, or NUL) and paths containing invalid characters will be rejected. UNC paths and extended-length paths using the \\?\ prefix are not supported. If the path points to a valid file, it will be loaded into the WebView using the appropriate file:// URL form.

Note that navigation to local files is supported, but applications should exercise caution when mixing remote and local content, as this may have cross-origin security implications. If your application needs to load dynamic HTML content, consider setting the DocumentText property instead.

This method only supports navigation to standard web and local resources. Valid URL schemes are limited to http://, https://, file://, and about:blank. Other protocols or custom application schemes are not supported and will cause the method to fail. This includes the edge://settings/profile page or any other internal configuration settings for the Edge browser. If your application needs to handle such protocols, you should implement a custom handler to intercept those links and handle them externally.

See Also

DocumentText Property, Url Property, NavigationCompleted Event, NavigationStarting Event