Rendering a Page's HTML to disk.

  • Thread starter Thread starter MattC
  • Start date Start date
M

MattC

Hi,

Is there anyway of once a Page has finished Rendering to the Render that
same HTML to disk?

TIA

MattC
 
Well I cheated in the end and used to following:

string m_OutputFile = "test.htm";

StreamWriter sw = new StreamWriter(m_OutputFile,true);


Server.Execute("mypage.aspx", sw);


sw.Flush();


sw.Close();



MattC
 
You might look at the HttpResponse.Filter property. According to help:
"When you create a Stream object and set the Filter property to the
Stream object, all HTTP output sent by Write passes through the
filter."

I'm not sure if that means everything on the page, or just things you
explicitly do a response.write on. But worth trying.
 
Back
Top