Rendering a Page's HTML to disk.

M

MattC

Hi,

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

TIA

MattC
 
M

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
 
P

Phillip Ian

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top