Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how to save the out html to a html file on server disk automatically ? (http://www.velocityreviews.com/forums/t82701-how-to-save-the-out-html-to-a-html-file-on-server-disk-automatically.html)

sincethe2003 07-14-2004 01:48 PM

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 ?



Craig Deelsnyder 07-14-2004 03:40 PM

Re: how to save the out html to a html file on server disk automatically?
 
sincethe2003 wrote:

> 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 Deelsnyder
Microsoft MVP - ASP/ASP.NET

Craig Deelsnyder 07-14-2004 05:18 PM

Re: how to save the out html to a html file on server disk automatically?
 
Craig Deelsnyder wrote:

> sincethe2003 wrote:
>
>> 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


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

http://www.c-sharpcorner.com/Code/20...tASPtoHTML.asp

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


All times are GMT. The time now is 09:51 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.