How to set the URL property of a web browser control to a string

I am using a C # web browser control and I would like to be able to connect different URLs depending on other things that happened in the program. How to set a URL property to a string in code? Is it possible to convert a string to type System.Uri?

string link;
string searchedtitle = "The+Italian+Job";
link = "http://www.imdb.com/find?s=all&q=" + searchedtitle + "&x=0y=0";
WbBrowser.Url = link; // This is what I don't know how to do

Something in this regard would be ideal where I could change the β€œsearchtitle” inside the program somewhere else and still work correctly. Unfortunately, the Url property has a type System.Uri, and I only have it System.String.

+5
source share
2 answers

WbBrowser.Url Uri,

WbBrowser.Url = new Uri(link);
+11

, URL- , Navigate(). Navigate URL-, URL- .

+8

All Articles