locked
Local htm file RRS feed

  • Question

  • I have a webbrowser object that targets a page on a server.  I would like to add that page to my project and keep it on the device as it's never going to change.

    when i try to add to the url in either code or the property box it give me an error.

     

    webbrowser1.url = "\mypage.htm" Doesnt work

     

    Wednesday, May 19, 2010 2:06 PM

Answers

  • The Url property is of type Uri. Since you're trying to assign string to it that should not even compile assuming you have proper settings for VB (Option Strict On - make sure to turn that on to avoid many potential bugs even before you run your application).

    Try creating Uri instance and assigning that instead. Also make sure path is correct. Remember on devices there are no relative paths, they must be absolute. Your path would expect file to be located in the root folder which I suspect is wrong.

    Here's something else you need to read. It explains how to post to forums correctly and shows why "doesn't work" simply does not cut it.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Rjl66 Thursday, May 20, 2010 12:30 PM
    Wednesday, May 19, 2010 4:10 PM