Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone. I am trying to copy the complete content of one IHTMLDocument2 to another new instantiated copy of IHTMLDocument2. In pseudo code, it would be something like this:

C#
IHTMLDocument2 newDoc.content() = oldDoc.content()


The reason why I'd like to do so, is simply that whenever a new webpage is loaded in the browser, i would like to create a copy of that page, process it while the original copy is being displayed to the user on screen. This way, the user wouldn't have to wait for the document to be processed before being displayed on screen.

Any thoughts would be truly appreciated. Thanks in advance!
Posted
Updated 20-Feb-13 22:56pm
v2

1 solution

(haven't tried it) I think you might be able to do this with innerHTML property.
 
Share this answer
 
Comments
Daroosh 6-Mar-13 7:51am    
Unfortunately, its not that simple! You'll be only copying the STRING content, however, i need to copy the whole page structure, along with the tags and scripts and everything.
H.Brydon 6-Mar-13 10:02am    
Also be aware that the 'wait' that you are talking about is not generally the time to process the web page - it is the time to download the page through the network. Processing time is usually minimal compared with traversal through the wire.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900