Solved

How can i send data grid content to email using asp.net?

Posted on 2008-10-03
4
164 Views
Last Modified: 2012-05-05
may i know How can i send data grid content to email using asp.net?

the simplest way...
0
Comment
Question by:kengkit
  • 3
4 Comments
 
LVL 21

Expert Comment

by:silemone
ID: 22635611
you have to iterate through grid rows and add them as the content of your email...
0
 

Author Comment

by:kengkit
ID: 22636143
ermm.. any code provide?

The following is what i using to send email:

    Private Function sendmail()

        Dim content As String

        content = "Hello"

        Dim myMessage As New MailMessage
        Dim myMail As SmtpMail
        myMessage.From = "admin@abc.com"
        myMessage.To = Me.txt_email.Text
        myMessage.Subject = "Welcome to My Home "
        myMessage.Body = content

        myMail.SmtpServer = "210.48.217.15"
        myMail.Send(myMessage)


    End Function
0
 
LVL 21

Accepted Solution

by:
silemone earned 25 total points
ID: 22636469
well what i would do first of all is use a stringBuilder to build my content...so content would be a stringbuilder...

So upon iterating through the cells of the grid, I would add needed data to StringBuilder and then I would

make myMessage.Body = stringBuilderName.ToString()...
0
 
LVL 21

Expert Comment

by:silemone
ID: 22636480
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS ReportViewer report timeout 7 122
SQL Login 17 50
Initial get page response times and IIS8 15 49
When should I use a controller? 3 34
Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question