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

Discussion in 'ASP .Net' started by sincethe2003, Jul 14, 2004.

  1. sincethe2003

    sincethe2003 Guest

    The .aspx output html text to client browser,
    how to save the out html to a html file on server disk automatically ?
     
    sincethe2003, Jul 14, 2004
    #1
    1. Advertising

  2. 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, Jul 14, 2004
    #2
    1. Advertising

  3. 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/2003/July/OutputASPtoHTML.asp

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
     
    Craig Deelsnyder, Jul 14, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jas Shultz
    Replies:
    0
    Views:
    951
    Jas Shultz
    Dec 3, 2003
  2. grz02
    Replies:
    3
    Views:
    9,090
    grz02
    Feb 18, 2004
  3. Replies:
    12
    Views:
    523
    santosh
    Nov 15, 2006
  4. subhadip
    Replies:
    0
    Views:
    641
    subhadip
    Mar 28, 2007
  5. Jake Barnes
    Replies:
    6
    Views:
    393
    9.co.uk
    Feb 8, 2006
Loading...

Share This Page