I\'m writing an application that uses the WebBrowser control to view web content that can change with AJAX that adds new content/elements. I can\'t seem to get at the new el
How about running javascript to caption the element and displaying it in a new window?
I haven't tested it out but it may work.
(WebBrowser)w.Navigate("javascript:GetElementById('div').innerHtml;", true);
The true attribute to open the return in a new windows. (Or a frame or maybe you can find a better way)
To capture the NewWindow event you'll need to reference the SHDocVw.dll which is in your Windows/System32 folder. Then you can cast your WebBrowser Control like this:
SHDocVw.WebBrowser_V1 browser = (SHDocVw.WebBrowser_V1)(WebBrowser)w.ActiveXInstance;
You can have it close right away after storing the response. Well good luck and let me know how it goes.