Sending a DataTable's content in an html email, what is the preferred way to generate HTML from a DataTable?
Sending 开发者_如何学运维a DataTable's content in an html email, what is the preferred way to generate HTML from a DataTable?
Bind to GridView or DataGrid and use the RenderControl method.
http://blogs.x2line.com/al/articles/859.aspx
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
精彩评论