I can't figure out how to display a local webpage. I've tried messing with the webBrowser control but it keeps adding "http://" to the front of the local webpage address, and if I try to change it from within the code like this:
The file wont be at \\webpage\blah.htm, its at c:\webpage\blah.html
the \\something notation usually means machine name, is your PC really called "webpage"?
ddanbe: I tried "webBrowser1.Navigate(webpage/Maphs v1.htm)", that gave me a 404.
LizR:
The HTML file is in a directory called "webpage", which is in the same directory as the program.
I wanted a local reference to the file, so that if I wanted to move the program's directory, it would work anyway. Evidently, that didn't happen.
Is there a way to make a local reference like that? Or should I just give up and hardcode the path in (which works)?
Last edited by FlamingBlade; Dec 7th, 2008 at 11:44 am.
You got me thinking about the location, and with some googling, I solved it.
I used "Application.ExecutablePath" to give me the location of the executable as a string, then added "webpage/maphs v1.htm" to it and used that - the webpage now displays.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.