Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

0

webbrowser1.url = new System.uri(my.settings.website) ;
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda