Im building an app in visual studio (Visual Basic or C#) for my website. (This is not a website advertisement)
there are 2 versions of the website. An old one and a New one. In the settings area of the app, a user presses a button which changes a variable (or setting). So when that button is clicked, the user can then go to the webbrowser and be greeted with that choice of the old one or the new one as they selected.
But when I code it in the browser form with webbrowser1.url = my.settings.website it throws back an error with a blue ~ line under my.settings.website saying: Value of type 'String' cannot be converted to 'System.uri'.
Does anyone know a way round this?
webbrowser1.Url property expects an object of type System.Uri and you are supplying just a String, which can't be converted automatically. Try the following:
webbrowser1.Url = new System.Uri(my.settings.website);
webbrowser1.url = new System.uri(my.settings.website) ;