S sincethe2003 Jul 14, 2004 #1 The .aspx output html text to client browser, how to save the out html to a html file on server disk automatically ?
The .aspx output html text to client browser, how to save the out html to a html file on server disk automatically ?
C Craig Deelsnyder Jul 14, 2004 #2 sincethe2003 said: The .aspx output html text to client browser, how to save the out html to a html file on server disk automatically ? Click to expand... 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
sincethe2003 said: The .aspx output html text to client browser, how to save the out html to a html file on server disk automatically ? Click to expand... 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
C Craig Deelsnyder Jul 14, 2004 #3 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 Click to expand... 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
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 Click to expand... 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