Good morning. Well as you all know, Obama is now President Elect Obama. The amount of work ahead of him is staggering. Though i am not a Democrat, I want him to succeed. It is going to be an interesting next 4 years.
Today, we need to render any object (in this case a table) to HTML for the purpose of email. I needed to email a table. Not a lot of code or difficult but it worked for me. This was in an ASP.NET application. In my case I used
myMailMessage.Body = GetHTMLFromControl(myTable)
Make it a great day!
Public Function GetHTMLFromControl(ByRef TheControl As Object) As String
Dim tw As IO.StringWriter = New IO.StringWriter
Dim hw As Html32TextWriter = New Html32TextWriter(tw)
Dim html As String = tw.ToString
hw = Nothing
tw = Nothing