Public Sub NavigateToPage(WebSocketObject As WebSocket, PageId As String, TargetUrl As String)
If Version.Length > 0 Then TargetUrl = $"${TargetUrl}?${Version}"$ ' <-- This line produces the error
If PageId.Length > 0 Then ABM.RemoveMeFromCache(CachedPages, PageId)
If WebSocketObject.Open Then
If Settings.BrowserKeepsNavigationHistory Then
' it keeps the navigation history in the browser
WebSocketObject.Eval("window.location = arguments[0]", Array As Object(TargetUrl))
Else
' it doesn't keep navigation history in the browser (the back button exists the application)
WebSocketObject.Eval("window.location.replace(arguments[0])", Array As Object(TargetUrl))
End If
WebSocketObject.Flush
End If
End Sub