Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
How do I Convert a String to a System.Uri?

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?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

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);
over 4 years ago · Santiago Trujillo Report

0

webbrowser1.url = new System.uri(my.settings.website) ;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!