Web browser.navigate("www.somesite.com") Load page in window but Webbrowser.Document returns Null
- by Waseem
Hi..
I am using Web browser control in a window form. Here i am navigating to some site with 1 parameter. It is loading the page into web browser but when i am looking for webbrowser.document to find some html tags so it is showing NULL for it.
I want to find out All Anchor tags in webbrowse Loaded page.
Following is my code.
webChatPage.Navigate(ConfigurationManager.AppSettings["ServerURL"].ToString() + "/somepage.php?someparameter=" + sessionId);
HtmlDocument hDoc = webChatPage.Document; //hDoc = NULL in debugging
HtmlElementCollection aTag = hDoc.Links;
MessageBox.Show(aTag.Count.ToString());
If there is any solution then help me out.