473,320 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Saving HTML Pages

I need to find a way to save an HTML page to the IIS server. What I need is
to have a button that once it is clicked the current page being displayed is
saved to a location on the local IIS server. I know there are ways to go
and get a page, but this one would be dynamic and wouldn't be saved so I
would need to save it while it is still active or have it forwarded to an
asp.net page that will take the html code and save it to a file.
TIA
Clay
Nov 18 '05 #1
3 1713
"Clay Black" <tw*@two.com> wrote in message
news:uY**************@TK2MSFTNGP14.phx.gbl...
I need to find a way to save an HTML page to the IIS server. What I need
is to have a button that once it is clicked the current page being
displayed is saved to a location on the local IIS server. I know there are
ways to go and get a page, but this one would be dynamic and wouldn't be
saved so I would need to save it while it is still active or have it
forwarded to an asp.net page that will take the html code and save it to a
file.


Clay, let's see if I have your request right:

1) Your user requests a page, perhaps by typing the URL into the address bar
in their browser
2) ASP.NET on the server sends some HTML back to the browser.
3) The browser loads and begins rendering the HTML, but the HTML likely
requires other resources, so
4) the browser begins requesting the other resources, like images,
stylesheets, etc., which are referenced in that HTML.
5) Eventually, the browser is finished rendering the HTML and resources, and
your user clicks a button which was part of the HTML
6) You want that button to cause "the HTML page" to be sent to "the local
IIS server"

Questions:

1) Do you only want the HTML to be sent, or do you also want the images?
2) When you say "the local IIS server", do you mean the server which sent
the original HTML, or some other server? Are web farms a consideration?
3) Where would you like the page to be stored? Would it be ok if it were
stored in one particular directory? Would it be ok if the saved page had a
random file name? You obviously don't want several users saving
"default.aspx" to the same directory.
4) You say "this one would be dynamic and wouldn't be saved". I presume you
mean that you got an error message when you tried to use File->Save As? If
so, note that anything you do to "save" the page will see the same problem.
In particular, you won't be able to save any changes made to the page by any
script running on the page, and you won't be able to save the state of any
applets or ActiveX controls. Also, if any of the images or other resources
used non-static URLs like this:

<img src="getimage.aspx?imageid=<something dynamic>">

then you won't know what image the user saw.
Perhaps if you gave more detail on what you need to do, we could help you
find an alternative?

John Saunders
Nov 18 '05 #2
If all you want to do is to save away one http://xxx/a.aspx's generated HTML
saved off by a different http://yyy/gethtml.aspx page, you can use
HttpWebRequest class to get the generated HTML and save it off. is that what
you are looking for?

"Clay Black" <tw*@two.com> wrote in message
news:uY**************@TK2MSFTNGP14.phx.gbl...
I need to find a way to save an HTML page to the IIS server. What I need is to have a button that once it is clicked the current page being displayed is saved to a location on the local IIS server. I know there are ways to go
and get a page, but this one would be dynamic and wouldn't be saved so I
would need to save it while it is still active or have it forwarded to an
asp.net page that will take the html code and save it to a file.
TIA
Clay

Nov 18 '05 #3
Thank you for your help!

Clay
"Girish bharadwaj" <gi*****@mvps.org> wrote in message
news:u3****************@TK2MSFTNGP10.phx.gbl...
If all you want to do is to save away one http://xxx/a.aspx's generated
HTML
saved off by a different http://yyy/gethtml.aspx page, you can use
HttpWebRequest class to get the generated HTML and save it off. is that
what
you are looking for?

"Clay Black" <tw*@two.com> wrote in message
news:uY**************@TK2MSFTNGP14.phx.gbl...
I need to find a way to save an HTML page to the IIS server. What I need

is
to have a button that once it is clicked the current page being displayed

is
saved to a location on the local IIS server. I know there are ways to go
and get a page, but this one would be dynamic and wouldn't be saved so I
would need to save it while it is still active or have it forwarded to an
asp.net page that will take the html code and save it to a file.
TIA
Clay


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lovely Angel For You | last post by:
Dear Friends Hope you all doing great. I have this problem. When I try to save any ASP page, I get the message that "The page will not save correctly". Even though I go ahead and when I go...
20
by: Stephen Poley | last post by:
People in these groups, and on web-pages, not infrequently suggest that it is worthwhile cutting down on white-space and comments in HTML and CSS in order to reduce loading times. I and others have...
1
by: MC | last post by:
How can we save entire html web pages to io streams, including picture files (jpeg, gif, etc.) and other linked files if any. We need to be able to save to disk entire html pages, not just their...
2
by: THY | last post by:
Hi, I am developing a website in english & chinese both language. whenever I save, it required I set the encoding in advanced save options. But I found there are 4 related to unicode, can anyone...
3
by: Denis Georgievski | last post by:
I am optimizing my web application written in ASP/VB.NET 1.1. I have number of pages that have dropdown list server controls that contain large number of items. Before redesigning the data access...
3
by: RCS | last post by:
I have an app that I have different "sections" that I want to switch back and forth from, all while having the server maintain viewstate for each page. In other words, when I am on Page1.aspx and...
4
by: Annie | last post by:
Hi guys, I am having a weired situation that don't know how to handle it ... I have master pages, the master page contains a dynaic menu which is set up in the database and has page url, name,...
7
by: Bam | last post by:
Hey gang. Is there a way, to automatically save a page that is db driven, as a page that contains html? i would like a page like http://tournamentsbyeck.com/past_standings3.asp to be...
3
by: ajaycfd | last post by:
hi all, I need to implement the following functionality in asp. I have got an asp page which renders some html onto the browser.Now instead of rendering the html to the browser i should save...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.