I'm using a Web Browser control in C# and I'd like to be able to plug in different URLs depending on other things that have happened in the program. How can I set the URL property to a string in the code? Can I convert a string to the System.Uri type?
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 to that effect would be ideal, where I could change 'searchedtitle' within the program somewhere else and still have it run properly. Unfortunately, the Url property is of type System.Uri
, and I only have a System.String
.