4
Contributors
5
Replies
8
Views
6 Years
Discussion Span
Last Post by wenlong88
0

Is this meant to be an ASP.Net web-form application or a C# windows-form application?

If it's a web-form application then:
1)It should have been posted in the ASP.Net forum
2) I'm not really sure how to get the value of the address bar if it's an URL outside of your site (such as google) but you can get the query string of the URL leading to your ASP.Net page (ie: www.yoursite.com?query=value by using

string myQuery = ClientQueryString;

If you're using a webBrowser control in a windows-forms application you can use the following to get the current URL from the webBrowser component but it'd be somewhat pointless since using a webBrowser component, the navigation would be based off another text input component of your windows form and you could simply get the info from there:

webBrowser1.Url.ToString();

Don't know if either of those help, the question wasn't exceedingly clear to me sorry :( Please remember to mark the thread as solved if it does get resolved though.

0

I am using c# application not asp.net.if u give me some sample code i will be so thankful to u.
Thanks

Edited by onlinessp: NOT COMPLETE

0

Unfortunately what you got from me before is about as good as I can do at the moment, sorry :( Maybe someone else will be more insightful than me but I'm off to sleep.

Good luck though :)

0

i suppose u r using a button "GO" to run the URL
if so... just add the below lines to click event of that button:

txturladdress.Text=webBrowser1.Url.ToString();
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.