Advertisement

07.04.2008 at 03:01AM PDT, ID: 23539104
[x]
Attachment Details

View generated source code from IE web browser control (ajax generated content)

Asked by bhermer in Microsoft Visual Basic.Net

Hi, I am trying to read the dynamic content of a webpage from a web control.

I can read it just fine for the original code, but cant access the generated code.

I know this can be done because IE WebDeveloper V2 can do this http://www.ieinspector.com/dominspector/index.html

I dont want a Select All and Copy type option, I know how to do that, and it wont work in this senerio

the code I have so far, in its simpliest form is

     Dim HTMLDoc As mshtml.HTMLDocument

        HTMLDoc = WebBrowser1.Document.DomDocument
       
        Dim f1 As mshtml.IHTMLWindow2 = CType(HTMLDoc.frames.item(2), mshtml.IHTMLWindow2)

        WriteLine(f1.document.body.innerHTML)

this will get me the original source on first load, but not any updated Ajax content?

If you dont know the answer to this, perhaps you know how to temporarialy disable javascript in an IE webbrowser control? that would serv me just as well as I could then use Select All > Copy

thanksStart Free Trial
 
Keywords: View generated source code from IE …
 
Loading Advertisement...
 
[+][-]07.06.2008 at 11:11PM PDT, ID: 21942977

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: Lolly-Ink
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906