|
-
May 27th, 2007, 05:19 PM
#1
Thread Starter
Junior Member
[RESOLVED] How Do I Convert a string to URI?
I'm reading a string from a text file, and want to use that string as the URL for my web browser object. The error I get is it needs to be URI, but I am completely lost on how to make a string into URI.
As always, any help is appreciated.
-
May 27th, 2007, 05:28 PM
#2
Re: How Do I Convert a string to URI?
Without seeing what code you are dealing with exactly it's a little bit difficult to say what you want exactly. But if you take this it might provide you with an idea:
vb Code:
Dim myString As String = "http://www.bbc.co.uk"
Me.WebBrowser1.Navigate(New Uri(myString))
-
May 27th, 2007, 05:32 PM
#3
Thread Starter
Junior Member
Re: How Do I Convert a string to URI?
 Originally Posted by stimbo
Without seeing what code you are dealing with exactly it's a little bit difficult to say what you want exactly. But if you take this it might provide you with an idea:
vb Code:
Dim myString As String = "http://www.bbc.co.uk"
Me.WebBrowser1.Navigate(New Uri(myString))
Thanks! With a little tweaking that worked perfectly.
-
Jan 30th, 2009, 08:13 PM
#4
New Member
Re: [RESOLVED] How Do I Convert a string to URI?
For the C# in all of us (even if this is a VB forum...)...
Code:
string myUrl = "http://www.vbforums.com";
Uri myUri = new Uri(myUrl);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|