Solved

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

Posted on 2008-10-03
4
162 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
Comment Utility
you have to iterate through grid rows and add them as the content of your email...
0
 

Author Comment

by:kengkit
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now