how to save the out html to a html file on server disk automatically ?

  • Thread starter Thread starter sincethe2003
  • Start date Start date
S

sincethe2003

The .aspx output html text to client browser,
how to save the out html to a html file on server disk automatically ?
 
sincethe2003 said:
The .aspx output html text to client browser,
how to save the out html to a html file on server disk automatically ?

Change the response's content type to

Response.ContentType = "application/octet-stream"

before outputting any HTML...

you can also add
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & filename & """")

and try to set a default filename, but if I remember this doesn't work
all the time
 
Craig said:
Change the response's content type to

Response.ContentType = "application/octet-stream"

before outputting any HTML...

you can also add
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & filename & """")

and try to set a default filename, but if I remember this doesn't work
all the time

gah, sorry, didn't notice you wanted server instead...my soln was for
saving at the client

http://www.c-sharpcorner.com/Code/2003/July/OutputASPtoHTML.asp
 
Back
Top