Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get a frame's content with mshtml?
    text
    copied!<p>Here's the issue:</p> <p>I have a hook in IE that reacts on <code>WebBrowser.OnNavigateComplete2</code> event to parse the content of the document for some precise info.</p> <p>That document contains frames, so I look into the <code>HTMLDocument.frames</code>. For each one, I look into the document.body.outerHTML property to check for the content. </p> <p>Problem is, the string I'm looking for never shows there, whereas it is displayed in the finale page. So, am I looking in the wrong place? If it is displayed when the page is fully loaded, then it's downloaded at some point, right? But in which object should I look ?</p> <p>BTW, I Don't know if that is of any importance, but the page I'm searching into comes from a ASP.NET application.</p> <pre><code>public void OnNavigateComplete2(object pDisp, ref object url) { document = (HTMLDocument)webBrowser.Document; mshtml.FramesCollection frames = document.frames; for (int i = 0; i &lt; frames.length; i++) { object refIdx = i; IHTMLWindow2 frame = (IHTMLWindow2)frames.item(ref refIdx); string frameContent = frame.document.body.outerHTML; } } </code></pre> <p>Thank your for your help.</p> <hr> <p>@rams This event is launched many times for each page, so I figured it was each time a framed is loaded, even if i don't get to catch the one I'm looking for. If not, what would be the event to catch the frames content?</p> <p>What I want to do is detect some precise info on a precise frame, then save it. later, a web page is loaded triggered by some user action, where I need the info I got from parsing the frame.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload