[RESOLVED] Need help with navigating webbrowser to local file
Hello, I'm trying to navigate a webbrowser, here's my code:
VB.NET Code:
Dim so As New StringOperations
Dim gPath = p.appPath & "\logo.html"
gPath = "file:///" & gPath.Replace("\", "/")
frm.WebBrowser1.Navigate(so.StringToUrl(gPath))
Output is:
Url after encoding: file:///C:/Users/Can/Desktop/oyun_listeleyici/Oyun%20Listeleyici/oyun_listeleyici/bin/Debug/logo.html
I'm not getting any errors however the browser remains same. Can anyone help me?
EDIT: I've been dealing with strings / uri's for hours I guess this isn't related to it.
Re: Need help with navigating webbrowser to local file
This worked for me for displaying local files:
Code:
WebBrowser1.Navigate(IO.Path.Combine(Application.StartupPath, "solution.htm"))
Re: Need help with navigating webbrowser to local file
Worked for me too. It's strange we have to hardcode for some things. Thanks a lot.