Hi,


I am trying to get the html source of the particular webpage that having different frames.i want the html source of a particular frame.

Thank you in advance

Recommended Answers

All 2 Replies

I didn't test this at all but you could try to use WebBrowser1.Document.GetElementById method. Few other methods or properties that might help you are WebBrowser1.Document.ActiveElement and WebBrowser1.Document.DomDocument . See the web browser control's documentation how to use them and what they do. There's no direct method to obtain either frame or single frame's HTML. Unless you use WebBrowser1.DocumentText and write your own HTML parser :)

HTH

Hi,


I am trying to get the html source of the particular webpage that having different frames.i want the html source of a particular frame.

Thank you in advance

Working with the WebBrowser control you can access the Frames within any document.

WebBrowser1.document.window.frames("FrameName").document.body.innerHTML

If yo don't have the name of the frame, simply traverse through the each of the HTMLElement objects checking for the TagName="FRAME" to obtain it's name.

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.