I just found out that to simulate a click I can call element.InvokeMember("click"); where element is an HtmlElement. But what I actually need is to open the link in a new window, but not on the default browser but on another WebBrowser I would create in my program. Sometimes it works to just get the href attribute by calling element.GetAttribute("href"); and then just navigating to the returned URL, but some picky web pages won’t work this way, I assume something to do with cookies and sessions.
I just found out that to simulate a click I can call element.InvokeMember(click); where
Share
Just handle the NewWindow2 event, create a form/tab that has a webbrowser on it, and use the webbrowser as the target of the new window request. Check http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx for an example.