Send datagrid via email

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

Do anyone know how to apply send datagrid via email?

Any website for reference?

Please advise.
 
I had the coding and it is working fine. But how do I bind data and send it
using email?

Dim objMM As New MailMessage()
ObjMM.To = "(e-mail address removed)"
objMM.From = "(e-mail address removed)"
objMM.BodyFormat = Mailformat.Html
objMM.Priority = MailPriority.Normal
objMM.Subject = "Test Email"
objMM.Body = "Please ignore this email due to testing via vb.net"
Smtpmail.SmtpServer = "hotmail"
Smtpmail.Send(objMM)

Please advise.
 
sam said:
I had the coding and it is working fine. But how do I bind data and send it
using email?

Dim objMM As New MailMessage()
ObjMM.To = "(e-mail address removed)"
objMM.From = "(e-mail address removed)"
objMM.BodyFormat = Mailformat.Html
objMM.Priority = MailPriority.Normal
objMM.Subject = "Test Email"
objMM.Body = "Please ignore this email due to testing via vb.net"
Smtpmail.SmtpServer = "hotmail"
Smtpmail.Send(objMM)

Please advise.

Well, I do believe that you might be going about this all wrong. The
primary use of a DataGrid is for easy addition of highly advanced
features (paging, sorting, etc.). What you might want to look at is the
repeater control, although I am also mystified as to how its end result
might appear in the content of an e-mail.

What you might want to do is "import" or "include" a separate web page
as the body of the e-mail. Then, you can use that separate web page,
pass variables on to it, and have it render properly *before* it is used
as the body of the e-mail. The tricky part is getting it to fully render
before the "send e-mail" script gets to it, but some screen scraping
might be the thing to use. That is, the collection of data or content
from a remote web page via HTTP. By using screen scraping, you ensure
that the DataGrid (or Repeater, or whatever you're gonna use) gets fully
rendered as desired before it is plunked down and used as the body of
the e-mail.

Don't ask me for an example, I'm just going out on a limb here...

....Geshel
--
**********************************************************************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top