Web browser.navigate("www.somesite.com") Load page in window but Webbrowser.Document returns Null
Posted
by Waseem
on Stack Overflow
See other posts from Stack Overflow
or by Waseem
Published on 2010-05-18T08:27:56Z
Indexed on
2010/05/18
8:30 UTC
Read the original article
Hit count: 507
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.
© Stack Overflow or respective owner