9

I need to save a page from url - This page is in my own application - in html format. This html will then be send by email to a user. Any anyone knows how?

2
  • Are you expecting to collect referenced resources such as IMGs and CSS as well? Commented Feb 8, 2009 at 13:59
  • Yes I need everything. The user has to open the Html and see the page like he will see it in internet. Commented Feb 8, 2009 at 14:28

2 Answers 2

29

Well, you'll have to do it at the server to be able to e-mail - so at worst, simply:

using(WebClient client = new WebClient()) {
    string html = client.DownloadString(address);
}

It might also be possible to do it directly within MVC - perhaps RenderPartial?

Sign up to request clarification or add additional context in comments.

Comments

1

You could create a Result Filter or override the OnResultExecuted method of the controller to get access to the rendered page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.