But I need to somehow load the webpage using some control and get the HTML
source code and write (save) to the disk. Here is what I did:
My code does not seem to be working. Please take a look at it and provide
where I need to change. My debugger is coming to the first line of the
DocumentComplete event and that is it. It is not going to the second line nor
giving me any exception.
object oPage = "http://www.google.com";
axWebBrowser1.Navigate2(ref oPage);
' Event
private void axWebBrowser1_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
UCOMIPersistFile oPersistFile = (UCOMIPersistFile)e.pDisp;
string xx = @"C:\MyWebPage.html";
oPersistFile.Save(xx, true);
}
Thanks,
Vijay
-------------------------------------------------------------------------------------------
"John A. Bailo" wrote:
HTML files are just text files.
You can just use a StreamWriter for saving the HTML string to a file.
Vijay wrote: Is it that much difficult to provide solution? Is it the same for MSFTs too?
Please provide some workable solution I have an urgent need.
Thanks,
Vijay
"Vijay" wrote:
I need to generate HTML files based on the some codes. One HTML file per
code. I have the link
(ex:http://123.234.345.456/WebPages/GetT...x?SomeCode=25), by passing
the code as parameter I will get the page displayed.
But I don't want to display it, instead save those files in one of the
network directories that can be accessed by our third party vended web based
application. How can I do this accessing and saving HTML files a directory
using C# in a windows app or Windows service? Any help?
Thanks in advance for your time and help,
Vijay