views:

39

answers:

3

Sending a DataTable's content in an html email, what is the preferred way to generate HTML from a DataTable?

+3  A: 

Bind to GridView or DataGrid and use the RenderControl method.

http://blogs.x2line.com/al/articles/859.aspx

Axl
+2  A: 

You could either :

  • manually generate an HTML table by looping through the table data
  • serialize the DataTable to XML (WriteXml method), and perform an XSL transform on the XML to generate HTML
Thomas Levesque
+1  A: 

Looks at this post

Gregoire