I'm successfully navigating from www.url 1 .com to www.url 2 .com using webbrowser control but iam unable to get the url of navigated page ie, www.url 2 .com, using Webbrowser control in asp.net web application.
Example:
I navigated to www.google.com
webBrowser.Navigate("http://www.google.com");
in that page i programatically given some text and click google search button as follow
HtmlElement textElement = webBrowser.Document.All.GetElementsByName("q")[0];
textElement.SetAttribute("value", "your text to search");
HtmlElement btnElement = webBrowser.Document.All.GetElementsByName("btnG")[0];
btnElement.InvokeMember("click");
After it navigated to [ https://www.google.co.in/?gfe_rd=cr&ei=dFMuWdWCHory8Afuwqog#q=your+text+to+search "]
Here my Question is How to get the that particular navigated url USING WEBBROWSER CONTROL IN c# i.e.,
**https://www.google.co.in/?gfe_rd=cr&ei=dFMuWdWCHory8Afuwqog#q=your+text+to+search"**
If you have any solution regarding this issue please share with me.
Thanks in advance.
由于页面是Web应用程序,因此使用href
链接页面
<a href="https://www.google.com">Google </a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.