0

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

3
Contributors
2
Replies
5
Views
8 Years
Discussion Span
Last Post by CodeDoctor
0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.