Navigate
Interface AntView
Type: Method
Parameters: String URL
Returns: nothing
Navigates to the URL passed and loads the document in the WebView2 control.
The navigation process will raise a number of events, starting with the OnNavigationStarting event.
You can see the results of the request in the OnNavigationCompleted event.
There are a number of other events that will follow as the navigation process proceeds.
More info about that at the Microsoft AntView2 documentation about that is here: navigation events
In summary the order of the triggered events is as follows:
It is important to note that the URL itself has to be a complete URL and should not ommit the protocol scheme.
For example:
URL = "192.168.0.100/SomeWebApp" is an invalid URL as it misses the protocol part and as a result it will not load anything.
whereas:
URL = "http://192.168.0.100/SomeWebApp" is a valid URL and the AntView control will try to load the resources available from that webserver on 192.168.0.100.
A small code example in Visual Basic:
Private Sub GoButton_Click()
Dim HtmlFile As String
Dim Path As String
' Load the html from file loginDemo.html
Path = strGetVisualBasicDemoPath
HtmlFile = Path & "\html\loginDemo.html"
EdgeWebBrowser.Navigate HtmlFile
End Sub
If the AntView control does not exist yet at the time when you try to issue your first navigate, the CreateWebView method is send implicitly.
In that scenario, the control is created asynchronously and once that completes, it is followed by the navigation.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 11/05/2025