Home All Groups Group Topic Archive Search About

read the contents of Address bar in browser

Author
23 Jan 2006 5:00 PM
kmercer46
Hi

Is there any way in VB.net using which I can read the content of
Address bar in browser so that I can find out currently which web site
is loaded in browser.


Thanks

Author
23 Jan 2006 5:20 PM
Mattias Sjögren
>Is there any way in VB.net using which I can read the content of
>Address bar in browser so that I can find out currently which web site
>is loaded in browser.

Which browsers do you need to support? I don't think there's a general
way to do it that will work for all browsers. But it's pretty easy to
do for IE, it has a nice automation object model.



Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
23 Jan 2006 5:47 PM
Patrice
Not sure what you mean ?

If this is your site you can get this information server side (using
VB.NET). Else you have to get this client side (using JavaScript) but the
script has to be loaded by your site...

If you meant any site that the user browses you can't of course for privacy
(if they were not technical) reasons...
--
Patrice

<kmerce***@yahoo.com> a écrit dans le message de
Show quoteHide quote
news:1138035617.347451.297840@g44g2000cwa.googlegroups.com...
> Hi
>
> Is there any way in VB.net using which I can read the content of
> Address bar in browser so that I can find out currently which web site
> is loaded in browser.
>
>
> Thanks
>
Author
23 Jan 2006 7:02 PM
Cor Ligthert [MVP]
Hi,

http://msdn2.microsoft.com/en-us/library/ms171712.aspx

The word for this is Uri, it exist in more flavours.

Document.Url  and more.

It is a part of the Document Object Model for HTML which is used by all
modern browsers.

I hope this helps,

Cor