Reputation: 1071
Help me please. How could I get the url from the address bar. Im using c# for this. it is window application
for example: if I type www.google.com in my address bar, then i would get "www.google.com" caption.
I have already done this to IExplorer, it was successful but i cannot get the url from Mozilla and Opera browsers. Kindly help
Upvotes: 2
Views: 857
Reputation: 24522
If you're using C# in an ASP .Net Page you can use
string url = Request.Path;
Or Request.Url contains URI information
Uri uri = Request.Url
If you're using Javascript on the client then use
var url = window.location;
Upvotes: 3