Search code examples
c#htmliframeinternet-explorer-8mshtml

iframe innerHTML visible in browser, however is null in code


I'm trying to access an iframe on a website using mshtml.

  • I can see the innerHTML in the website's frame in browser.
  • I can also access the "DIV" within iframe from code.
  • The document is properly loaded as well.
  • The iframe also belongs to the same domain.

I can see the innerHTML in the website's frame in browser

However when I am looking for it in the code, it is showing null.

I am looking for it in the code, it is showing null

Can anyone help?

I tried This, but no gain.


Solution

  • Please try

    as doc.document.getelementbyid

    as IE 11 has changed some accessing attributes.

    readystate is no longer supported by IE 11