Hi there,
You can send your controls to a String Writer, then convert that to a string, and set that string as the body for your e-mail. The following code shows how to do that with a DataSet:
Code:
Dim myStringWriter As New System.IO.StringWriter
Dim myHtmlWriter As New System.Web.UI.HtmlTextWriter(myStringWriter)
Dim myDataGrid As New DataGrid
myDataGrid.DataSource = WhatEverItIsYouWantToBindTo
myDataGrid.DataBind()
myDataGrid.RenderControl(myHtmlWriter)
MyMailMessage.Body = myStringWriter.ToString()
You can do the same with other controls, as RenderControl is defined in the base class Control.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Otherside by
Red Hot Chili Peppers (Track 4 from the album:
Californication)
What's This?