How do I convert a table object to a string for an HTML email or insert table object into body of HTML email?
Posted on 2008-10-07
I have a function that returns a table to display what a user has purchased for their receipt.
I am displaying the page when the user completes their order, but I'd also like to email the user a copy of the receipt.
The problem I am facing is the email class I'm using (MailMessage) only accepts a String for the body.
Thus, my originally intended code (myMailMessage.Body = myTable) is unacceptable.
I need to either convert the myTable object into a string or find a way to implement my table into the body of this html email message.
(I'm using VB .NET)