saving HTML file from aspx

  • Thread starter Thread starter David
  • Start date Start date
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
 
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.
 
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...
 
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);

}
 
Back
Top