Solved

asp.net save page as html

Posted on 2010-08-24
5
310 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now