D
Dave Tichenor
how to you email a datagrid as a html email message.
this is what i have
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'Create MailMessage instance, set properties, and send
Dim Mail As New MailMessage
Dim sw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(sw)
Dim body As String
'Render DataGrid output as Html
EligInfo.RenderControl(hw)
'Dim dataGridHTML As String = hw.ToString()
Mail.To = "(e-mail address removed)"
Mail.Cc = ""
Mail.Bcc = ""
Mail.Subject = "Requested Eligibility Change"
'Mail.BodyFormat = MailFormat.Html
Mail.Body = sw.ToString
Mail.From = "(e-mail address removed)"
SmtpMail.SmtpServer = "Mailserver"
SmtpMail.Send(Mail)
this is what i have
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'Create MailMessage instance, set properties, and send
Dim Mail As New MailMessage
Dim sw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(sw)
Dim body As String
'Render DataGrid output as Html
EligInfo.RenderControl(hw)
'Dim dataGridHTML As String = hw.ToString()
Mail.To = "(e-mail address removed)"
Mail.Cc = ""
Mail.Bcc = ""
Mail.Subject = "Requested Eligibility Change"
'Mail.BodyFormat = MailFormat.Html
Mail.Body = sw.ToString
Mail.From = "(e-mail address removed)"
SmtpMail.SmtpServer = "Mailserver"
SmtpMail.Send(Mail)