Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp.net save page as html

Posted on 2010-08-24
5
Medium Priority
?
320 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:Alpha Au
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 2000 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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

876 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