saving a rendered web page
-
Hi All I need to develop a C# client able to save a web page given a URL. The problem I am is that the web pages i.e. the content are rendered by some javascript. Can you advise me about an easy way to do that? Thanks
You don't say in what format you want to 'save' the page. You may be able to render the page using a
System.Windows.Forms.WebBrowser
control and use that. Nick---------------------------------- Be excellent to each other :)
-
You don't say in what format you want to 'save' the page. You may be able to render the page using a
System.Windows.Forms.WebBrowser
control and use that. Nick---------------------------------- Be excellent to each other :)
-
You don't say in what format you want to 'save' the page. You may be able to render the page using a
System.Windows.Forms.WebBrowser
control and use that. Nick---------------------------------- Be excellent to each other :)
-
My Page renders a simple HTML table generated automatically by some javascript. I would like to save the rendered page in HTML format so that I can parse it or reload it later.
Basically, you want a javascript interpreter. Caveat: I haven't tried this, but I would if I were you :) Create a
WebBrowser
control and give it your [ template HTML / javascript ] usingDocumentText
. Hook theDocumentComplete
event and see what is in theDocument
property. I know theWebBrowser
control knows how to run javascript, so that's a start. If you do try this, please let me know if it works - I'm interested :) Nick---------------------------------- Be excellent to each other :)
-
Basically, you want a javascript interpreter. Caveat: I haven't tried this, but I would if I were you :) Create a
WebBrowser
control and give it your [ template HTML / javascript ] usingDocumentText
. Hook theDocumentComplete
event and see what is in theDocument
property. I know theWebBrowser
control knows how to run javascript, so that's a start. If you do try this, please let me know if it works - I'm interested :) Nick---------------------------------- Be excellent to each other :)
Well I have just found what I need for my specific purposes; I hope that it fits also yours. Please have a look at this project The most complete C# Webbrowser wrapper control[^] Digging and trying I found that this project provides DOM information and is exactly what I need. I found that you need an active x for accomplish this handling the IHTMLDocument2 class. PLease look also here column_1[^] and here column_2[^]