Solved

asp.net save page as html

Posted on 2010-08-24
5
312 Views
Last Modified: 2012-08-13
Hi,


Is it possible to save my current .aspx page as html? By any means, like invoke save as dialogue or capture html of page?

Thank you
0
Comment
Question by:mkk39
5 Comments
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33515086
In an automated fashion or just one time?  You could hit CTRL + S on your keyboard to save it while viewing in IE.
0
 

Author Comment

by:mkk39
ID: 33515101
How can I do it using asp.net?
0
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33515164
In ASP.NET you can do a HttpWebRequest to get the content of the HTML that would be sent to a browser and then do whatever you want with it:

string stringURL = "http://www.google.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(stringURL);
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
0
 
LVL 7

Expert Comment

by:alphaau
ID: 33518762
if  you only need the generated html of you asp.net site, you may use thrid party tools, like HTTrack Website Copier

http://www.httrack.com/

0
 
LVL 5

Accepted Solution

by:
sindhuxyz earned 500 total points
ID: 33519350
Put all tags of html along with data, write it like file with html extension. The html file will be created.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question