Reputation: 9338
I have an e-commerce type application and when the user submits their payment I want to display a receipt page as well as a copy of the receipt in an email. Since the HTML for the receipt page and the receipt email is the same I would like use the View to generate HTML for the email.
How can I get the html from a view from within the controller?
Upvotes: 2
Views: 2057
Reputation: 1038820
You may take a look at the following article. But because you mentioned emailing views you should definitely take a look at MvcMailer. Scott Hanselman also blogged about it.
Upvotes: 2