Last post Jun 18, 2008 05:19 PM by greekcandyman
Jun 18, 2008 04:01 PM|greekcandyman|LINK
I have a form with a WebBrowser in it. When the application loads, the WebBrowser opens to a site, say "microsoft.com".
I want to write some code that extracts parts of the WebBrowser url, for example the "http://", or whatever part I want.
How would i do that? I played around for a while and I kept on receiving an error that "WebBrowser1.Url cannot be converted to a String".
Is there still a way to do this? Thanks!
webbrowser url parsing string
Jun 18, 2008 04:40 PM|hwaheed|LINK
WebBrowser1.Url doest returns a string. It returns an object of type Uri.
To get the URL please use this code webBrowser1.Url.AbsoluteUri
Hope this helps!
Please dont forget to Mark as Answer if the post helped you
Jun 18, 2008 05:19 PM|greekcandyman|LINK
Wow I totally didn't know that!
It works... I'll just have to tweak my code a bit...