saving HTML file from aspx

D

David

hi...
i have webform *.aspx file, wich do some bd requests and generates (how it
should) html file to show on client pc..

now...
i want my web solution, this web form is part of this solution, to somehow
save this html-generated-by-aspx to a file on server computer, without
showing aspx to client
 
K

KMA

Not quite clear what the purpose is. To disguise the fact that your running
ASP.NET on server? To cache the results for subsequent page request? To log
who asked for what? Explain more.
 
D

David Ichilov

i don't want aspx to be generated on every request. insted, were will be
a-pre-generated html, saved on server, and every time client browser
will see it...
 
G

Guest

If I understood your requirement correctly, try the following:

Solution:
----------

private void button1_Click(object sender, System.EventArgs e)
{
string sURL = "www.google.com";
axWebBrowser1.Navigate(sURL);
}

// axWebBrowser1 event
private void axWebBrowser1_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)

{

string sFileName = System.Windows.Forms.Application.StartupPath +
"\\ATC.htm";

UCOMIPersistFile oPersistFile =
(UCOMIPersistFile)axWebBrowser1.Document;

oPersistFile.Save(sFileName, true);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top